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 2 Question 90 Discussion

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

SIMULATION

Get list of all the pods showing name and namespace with a jsonpath expression.

Show Suggested Answer Hide Answer
Suggested Answer: A

kubectl get pods -o=jsonpath='{.items[*]['metadata.name'

, 'metadata.namespace']}'


Contribute your Thoughts:

0/2000 characters
Lenna
1 month ago
It's all about practicing those commands!
upvoted 0 times
...
Queen
1 month ago
I hope I remember the syntax correctly.
upvoted 0 times
...
Mitzie
1 month ago
I feel confident about this one!
upvoted 0 times
...
Billi
2 months ago
I would use `kubectl get pods -o jsonpath='{.items[*].metadata.name} {.items[*].metadata.namespace}'`.
upvoted 0 times
...
Noah
2 months ago
I think it's straightforward if you know jsonpath.
upvoted 0 times
...
Elenore
2 months ago
Definitely a game changer for managing namespaces!
upvoted 0 times
...
Wei
2 months ago
I thought jsonpath was more complicated than that.
upvoted 0 times
...
Lindsey
3 months ago
Wait, can you really get all that info in one line?
upvoted 0 times
...
Veronika
3 months ago
Wait, is this the same as using kubectl get pods -o jsonpath?
upvoted 0 times
...
Omega
3 months ago
Hmm, I think I've seen this kind of question before. Let me think about it.
upvoted 0 times
...
Tiera
3 months ago
Jsonpath is a powerful tool, I'm sure this will be a piece of cake.
upvoted 0 times
...
Slyvia
3 months ago
This is a straightforward question, the solution is pretty simple.
upvoted 0 times
...
Stephaine
4 months ago
I practiced this last week, and I believe the full command should look like `kubectl get pods -o jsonpath='{.items[*].metadata.name} {.items[*].metadata.namespace}'`.
upvoted 0 times
...
Elliot
4 months ago
I feel like we also need to include the namespace in the jsonpath, but I can't recall how to format that part correctly.
upvoted 0 times
...
Torie
4 months ago
I remember practicing a similar question, and I think it was something like `-o jsonpath='{.items[*].metadata.name}'` for names.
upvoted 0 times
...
Reuben
4 months ago
I think we need to use `kubectl get pods` with a jsonpath option, but I'm not entirely sure about the exact syntax.
upvoted 0 times
...
Corinne
4 months ago
Okay, I've got a plan. I'll use the `kubectl get pods -o jsonpath='{.items[*].metadata.name} {.items[*].metadata.namespace}'` command. Gotta make sure I get the jsonpath expression right, but I think I can nail this.
upvoted 0 times
...
Sabrina
4 months ago
That works! Super handy for quick checks.
upvoted 0 times
...
Malcom
5 months ago
Oof, jsonpath can be tricky. I'll need to think through the exact syntax to extract the name and namespace. Maybe I'll start with a simpler kubectl command and then try to translate that to jsonpath.
upvoted 0 times
...
Alona
5 months ago
You can use `kubectl get pods -o jsonpath='{.items[*].metadata.name} {.items[*].metadata.namespace}'`
upvoted 0 times
...
Penney
5 months ago
This question is tricky!
upvoted 0 times
...
Long
5 months ago
Jsonpath? I'm a little fuzzy on that, but I know kubectl has some built-in options for getting pod info. I'll need to double-check the docs, but I'm confident I can figure this out.
upvoted 0 times
...
Patrick
6 months ago
Hmm, this looks like a straightforward JSON parsing question. I'll need to brush up on my jsonpath syntax, but I think I can handle this.
upvoted 0 times
Lindsey
9 days ago
Let's share tips after we try it!
upvoted 0 times
...
Octavio
15 days ago
I found some great resources online.
upvoted 0 times
...
Pearlie
20 days ago
Practice makes perfect!
upvoted 0 times
...
Tijuana
25 days ago
It's not too hard once you get the hang of it.
upvoted 0 times
...
Bettyann
5 months ago
I struggle with jsonpath sometimes.
upvoted 0 times
...
...

Save Cancel