nerdexam
Linux_Foundation

CKA · Question #33

List all the pods showing name and namespace with a json path expression

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

Submitted by haruto_sh· May 4, 2026Workloads and Scheduling

Question

List all the pods showing name and namespace with a json path expression

Explanation

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

Topics

#kubectl#pods#jsonpath#data extraction

Community Discussion

No community discussion yet for this question.

Full CKA Practice