KCNA Container Orchestration Practice Question
Which command would you run to get a list of all pods in all namespaces?
⚠ Common exam trap
CNCF often tests the misconception that a wildcard or global flag exists for namespace selection, leading candidates to choose `--namespace=*` or `--global` instead of the correct `--all-namespaces` flag.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
kubectl get pods --all-namespaces
`kubectl get pods --all-namespaces` (or its shorthand `-A`) retrieves pods from every namespace in the cluster. This flag overrides the default behavior of `kubectl get pods`, which only returns pods in the current namespace (usually `default`).
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
kubectl get pods --namespace=*
Why it's wrong here
Asterisk is not a valid namespace wildcard.
- ✗
kubectl get pods --global
Why it's wrong here
--global is not a valid flag.
- ✓
kubectl get pods --all-namespaces
Why this is correct
This lists pods in all namespaces.
- ✗
kubectl get pods --include-uninitialized
Why it's wrong here
Not a valid flag for listing all namespaces.
Go deeper
Related to this question
About these practice questions
This KCNA question is part of Courseiva's 833-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This KCNA practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the KCNA exam.