Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Linux Foundation CKA Exam - Topic 5 Question 85 Discussion

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

Create a file:

/opt/KUCC00302/kucc00302.txt that lists all pods that implement service baz in namespace development.

The format of the file should be one pod name per line.

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

0/2000 characters
Rosalia
3 months ago
Yeah, but don't forget to check the labels!
upvoted 0 times
...
Louvenia
3 months ago
Wait, does that actually work for all namespaces?
upvoted 0 times
...
Mari
3 months ago
Just use `kubectl get pods -n development -l app=baz` to list them.
upvoted 0 times
...
Georgeanna
4 months ago
I thought we needed to specify the service name too?
upvoted 0 times
...
Lynsey
4 months ago
Totally agree, that's the easiest way!
upvoted 0 times
...
Juliann
4 months ago
I think we might need to use `kubectl get pods --selector` to filter by the service, but I can't recall the exact syntax.
upvoted 0 times
...
Charolette
4 months ago
I feel a bit lost on how to specify the namespace in the command. Is it `-n development` or something else?
upvoted 0 times
...
Jutta
4 months ago
I remember practicing a similar question where we had to list deployments. I think we might need to use `-o name` or something like that to get just the pod names.
upvoted 0 times
...
Augustine
5 months ago
I think we need to use `kubectl get pods` with some flags to filter by the service, but I'm not entirely sure how to format the output.
upvoted 0 times
...
Linette
5 months ago
This is a good opportunity to practice my Kubernetes skills. I'll take it step-by-step and make sure I get the file created correctly.
upvoted 0 times
...
Linn
5 months ago
Wait, do I need to use `kubectl` or can I just use standard Linux commands to create the file? I'm a bit confused about the requirements here.
upvoted 0 times
...
Reynalda
5 months ago
Okay, I think I've got this. I'll use `kubectl get pods -n development --selector=app=baz` to list the pods, then redirect the output to the file at the specified path.
upvoted 0 times
...
Harrison
5 months ago
Hmm, I'm not sure how to create that file in the specified location. I'll need to look up the commands for that.
upvoted 0 times
...
Walker
5 months ago
This looks straightforward. I'll start by checking the pods in the development namespace and filtering for the ones that implement the baz service.
upvoted 0 times
...
Jettie
8 months ago
Haha, this reminds me of that time I accidentally deleted the entire 'development' namespace. Not making that mistake again!
upvoted 0 times
...
Kristin
8 months ago
Ah, I see. So we need to create a file with the list of pods that implement the 'baz' service in the 'development' namespace. Sounds good, I'm on it!
upvoted 0 times
Antonio
7 months ago
I'll make sure to list all pods implementing service baz in namespace development.
upvoted 0 times
...
Ettie
8 months ago
Remember, one pod name per line in the file.
upvoted 0 times
...
Beatriz
8 months ago
Got it! Let's create that file with the pod names.
upvoted 0 times
...
...
Alaine
9 months ago
That's a good idea. We can then redirect the output to a file in the specified format.
upvoted 0 times
...
Tamra
9 months ago
Yes, we can use the kubectl command to get the pods and then filter by service.
upvoted 0 times
...
Alaine
9 months ago
I think we need to create a file listing pods implementing service baz in namespace development.
upvoted 0 times
...
Jolanda
9 months ago
This seems pretty straightforward. I'd use the `kubectl get pods -n development --selector=app=baz -o name` command to get the list of pod names and then write them to the file.
upvoted 0 times
Juliana
8 months ago
After creating the file, you can verify its contents with `cat /opt/KUCC00302/kucc00302.txt`.
upvoted 0 times
...
Marva
9 months ago
Don't forget to specify the full path to the file when redirecting the output.
upvoted 0 times
...
Wilbert
9 months ago
You can also use the `awk` command to extract just the pod names from the output.
upvoted 0 times
...
Stefan
9 months ago
That's a good approach. Make sure to redirect the output to the file using `>`.
upvoted 0 times
...
...

Save Cancel