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

Posted by Bobbye on Nov 23, 2025 at 10:53 AM

SIMULATION

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

Suggested Answer: A

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

, 'metadata.namespace']}'


Get Premium CKA Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
28 comments · newest first
LE
Lenna 7 months ago
It's all about practicing those commands!
QU
Queen 7 months ago
I hope I remember the syntax correctly.
MI
Mitzie 7 months ago
I feel confident about this one!
BI
Billi 8 months ago
I would use `kubectl get pods -o jsonpath='{.items[*].metadata.name} {.items[*].metadata.namespace}'`.
NO
Noah 8 months ago
I think it's straightforward if you know jsonpath.
EL
Elenore 8 months ago
Definitely a game changer for managing namespaces!
WE
Wei 8 months ago
I thought jsonpath was more complicated than that.
LI
Lindsey 9 months ago
Wait, can you really get all that info in one line?
VE
Veronika 9 months ago
Wait, is this the same as using kubectl get pods -o jsonpath?
OM
Omega 9 months ago
Hmm, I think I've seen this kind of question before. Let me think about it.
TI
Tiera 9 months ago
Jsonpath is a powerful tool, I'm sure this will be a piece of cake.
SL
Slyvia 9 months ago
This is a straightforward question, the solution is pretty simple.
ST
Stephaine 10 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}'`.
EL
Elliot 10 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.
TO
Torie 10 months ago
I remember practicing a similar question, and I think it was something like `-o jsonpath='{.items[*].metadata.name}'` for names.
RE
Reuben 10 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.
CO
Corinne 10 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.
SA
Sabrina 10 months ago
That works! Super handy for quick checks.
MA
Malcom 11 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.
AL
Alona 11 months ago
You can use `kubectl get pods -o jsonpath='{.items[*].metadata.name} {.items[*].metadata.namespace}'`
PE
Penney 11 months ago
This question is tricky!
LO
Long 11 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.
PA
Patrick 12 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.
LI
Lindsey 6 months ago
↳ replying to Patrick
Let's share tips after we try it!
OC
Octavio 6 months ago
↳ replying to Patrick
I found some great resources online.
PE
Pearlie 7 months ago
↳ replying to Patrick
Practice makes perfect!
TI
Tijuana 7 months ago
↳ replying to Patrick
It's not too hard once you get the hang of it.
BE
Bettyann 11 months ago
↳ replying to Patrick
I struggle with jsonpath sometimes.
0/2000 characters

Save Cancel