CKAD Application Observability and Maintenance Practice Question
Which command shows the CPU and memory usage of all pods in the current namespace?
⚠ Common exam trap
CNCF often tests the misconception that `kubectl top pod` requires a pod name to show metrics, but omitting the pod name lists all pods in the current namespace, which is the correct syntax for the question's requirement.
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 top pod
`kubectl top pod` without a specific pod name retrieves CPU and memory usage metrics for all pods in the current namespace, as the command defaults to listing all pods when no pod name is provided. This relies on the metrics-server collecting resource usage data from the kubelet's cAdvisor endpoint via the Resource Metrics API.
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 top node
Why it's wrong here
kubectl top node — wrong because it shows node metrics, not pod metrics. The command queries the metrics API for node-level CPU/memory consumption, aggregating all pods on a node into a single per-node metric. That does not satisfy the requirement of viewing usage per individual pod.
- ✗
kubectl top --all
Why it's wrong here
kubectl top --all — wrong because the top command has no --all flag; the correct syntax uses resource types and optional name. Adding an unknown flag causes kubectl to fail with a flag-not-found error, so this isn't a valid way to list all pods.
- ✗
kubectl top pod pod-name
Why it's wrong here
kubectl top pod pod-name — wrong because it targets a single named pod, so it returns metrics only for that specific pod. To see all pods in the current namespace, you must omit the pod name entirely, which makes kubectl query and display metrics for every pod in that namespace.
- ✓
kubectl top pod
Why this is correct
kubectl top pod — correct because it directly invokes the top command with the pod resource type, without a specific pod name, which causes it to retrieve CPU and memory usage for all pods running in the current namespace from the metrics API. This is the exact syntax required to get a namespace-wide view of pod resource consumption.
Go deeper
Related to this question
About these practice questions
One of 826 original CKAD practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CKAD 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 CKAD exam.