U.S. Independence Day Deal! Unlock 25% OFF Today – Limited-Time Offer - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Linux Foundation CKA Exam - Topic 5 Question 17 Discussion

Create 2 nginx image pods in which one of them is labelled with env=prod and another one labelled with env=dev and verify the same.
A) kubectl run --generator=run-pod/v1 --image=nginx -- labels=env=prod nginx-prod --dry-run -o yaml > nginx-prodpod.yaml Now, edit nginx-prod-pod.yaml file and remove entries like ''creationTimestamp: null'' ''dnsPolicy: ClusterFirst'' vim nginx-prod-pod.yaml apiVersion: v1 kind: Pod metadata: labels: env: prod name: nginx-prod spec: containers: - image: nginx name: nginx-prod restartPolicy: Always # kubectl create -f nginx-prod-pod.yaml - image: nginx name: nginx-dev restartPolicy: Always # kubectl create -f nginx-prod-dev.yaml Verify : kubectl get po --show-labels kubectl get po -l env=prod kubectl get po -l env=dev
B) kubectl run --generator=run-pod/v1 --image=nginx -- labels=env=prod nginx-prod --dry-run -o yaml > nginx-prodpod.yaml Now, edit nginx-prod-pod.yaml file and remove entries like ''creationTimestamp: null'' ''dnsPolicy: ClusterFirst'' vim nginx-prod-pod.yaml apiVersion: v1 kind: Pod metadata: labels: env: prod name: nginx-prod spec: containers: - image: nginx name: nginx-prod restartPolicy: Always # kubectl create -f nginx-prod-pod.yaml kubectl run --generator=run-pod/v1 --image=nginx -- labels=env=dev nginx-dev --dry-run -o yaml > nginx-dev-pod.yaml apiVersion: v1 kind: Pod metadata: labels: env: dev name: nginx-dev spec: containers: - image: nginx name: nginx-dev restartPolicy: Always # kubectl create -f nginx-prod-dev.yaml Verify : kubectl get po --show-labels kubectl get po -l env=prod kubectl get po -l env=dev

Linux Foundation CKA Exam - Topic 5 Question 17 Discussion

Actual exam question for Linux Foundation's CKA exam
Question #: 17
Topic #: 5
[All CKA Questions]

Create 2 nginx image pods in which one of them is labelled with env=prod and another one labelled with env=dev and verify the same.

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

0/2000 characters
Loreta
8 months ago
Double-check the pod names in the YAML files, might cause issues!
upvoted 0 times
...
Alysa
8 months ago
I love how easy it is to label pods now!
upvoted 0 times
...
Anjelica
8 months ago
Wait, are we really using the old generator? Thought that was deprecated!
upvoted 0 times
...
Apolonia
8 months ago
Looks good, but why remove those entries? Seems unnecessary.
upvoted 0 times
...
Chan
8 months ago
Just ran the commands, both pods created successfully!
upvoted 0 times
...
Pamella
8 months ago
I believe we have to verify the pods using `kubectl get po --show-labels`, but I'm not sure if I need to include any additional flags.
upvoted 0 times
...
Dan
8 months ago
I practiced a similar question where we had to create multiple pods, but I can't recall if we needed to specify the restart policy explicitly.
upvoted 0 times
...
Desire
8 months ago
I'm a bit unsure about the exact syntax for the labels in the kubectl command. Did we use `--labels` or just `labels=`?
upvoted 0 times
...
Reuben
9 months ago
I think I remember that I need to create two separate YAML files for each pod, one for prod and one for dev.
upvoted 0 times
...
Val
9 months ago
Hmm, this looks like a straightforward multiple-choice question on file formats. I'll need to carefully read through the options and think about which ones are most likely to be correct.
upvoted 0 times
...
Glennis
9 months ago
Whoa, this is a tough one. I'm not super confident in my ability to interpolate bond spreads. Maybe I'll try to eliminate some of the options first before attempting the full calculation.
upvoted 0 times
...
Mendy
9 months ago
Okay, let me think this through step-by-step. Porter received $35,000 in wages, $4,000 in unemployment compensation, and $2,000 in supplemental unemployment benefits. So the total gross income would be $35,000 + $4,000 + $2,000 = $41,000. I'm pretty confident that's the right answer.
upvoted 0 times
...
Cordelia
9 months ago
I think the best first step is to analyze the precursors and indicators, but I'm not entirely sure. This feels like one of those tricky scenarios.
upvoted 0 times
...
Sina
9 months ago
Alright, let me think this through step-by-step. PMON is the process monitor, so that's a must-have. RECO is the recoverer process, which is also essential. And LREG is the listener registration process, which I believe is required as well. I'll go with those three.
upvoted 0 times
...
Tish
9 months ago
I think a lot depends on the context, but ensuring understanding sounds plausible. However, I don't recall that being a common tactic for deceitful responses.
upvoted 0 times
...

Save Cancel