CKA Troubleshooting Practice Question
You need to check the resource usage of nodes in your cluster. Which command should you run?
⚠ Common exam trap
Candidates often confuse `kubectl describe nodes` (which shows static capacity and allocatable resources) with `kubectl top nodes` (which shows dynamic, real-time usage), leading them to choose option D when they need actual consumption data.
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 nodes
`kubectl top nodes` retrieves and displays real-time CPU and memory usage metrics for all nodes in the cluster. This command relies on the metrics server being deployed and functioning, which aggregates resource usage data from kubelet’s cAdvisor endpoint. It is the standard Kubernetes command for checking node-level resource consumption.
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 nodes
Why this is correct
The "kubectl top nodes" command queries the Metrics Server API to retrieve and display the current, real-time CPU and memory utilization of all nodes in the cluster. This is the standard, built-in command used by administrators to quickly identify resource-constrained nodes. It requires the Metrics Server to be properly installed and running in the cluster to function.
- ✗
kubectl get nodes -o wide
Why it's wrong here
While "kubectl get nodes -o wide" provides valuable metadata such as internal/external IP addresses, OS images, kernel versions, and container runtime versions, it does not query the Metrics API. Consequently, it cannot display active CPU or memory consumption metrics. It is primarily used for cluster topology and network discovery rather than performance monitoring.
- ✗
kubectl logs --all-containers
Why it's wrong here
The "kubectl logs" command is designed to retrieve stdout and stderr streams from container workloads, not to measure infrastructure performance. Furthermore, "--all-containers" is a flag used to target multiple containers within a pod, and applying it globally without a target resource is syntactically invalid. It cannot access or report node-level hardware utilization metrics.
- ✗
kubectl describe nodes
Why it's wrong here
Running "kubectl describe nodes" displays static configuration details, node conditions, events, and resource allocations (requests and limits) for scheduled pods. However, it does not show actual, real-time resource consumption. A node might have low requested resources but high actual CPU usage, which this command cannot reveal.
Go deeper
Related to this question
Learn chapter
Kubernetes Architecture Overview
Key term
kubectl Command Reference
kubectl is the command-line tool used to interact with and manage Kubernetes clusters by sending commands to the Kubernetes API.
Key term
Ingress Resources
Ingress Resources are Kubernetes API objects that manage external access to services inside a cluster, typically HTTP and HTTPS traffic, by defining rules for routing requests based on hostnames and paths.
About these practice questions
Courseiva writes every CKA question from scratch — 302 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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 CKA 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 CKA exam.