Courseiva
Troubleshooting →easyMultiple Choice

CKA Troubleshooting Practice Question

Which command shows CPU and memory usage of nodes in the cluster?

⚠ Common exam trap

Test-takers frequently confuse `kubectl describe nodes` (which shows allocatable resources but not real-time usage) with `kubectl top nodes` (which shows actual current usage), leading them to pick option A incorrectly.

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` is the command specifically designed to display real-time CPU and memory usage metrics for all nodes in a Kubernetes cluster. It relies on the metrics server, which collects resource usage data from kubelets via the Summary API, and presents it in a concise table format.

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 describe nodes

    Why it's wrong here

    kubectl describe nodes prints a detailed inventory of each node's labels, taints, addresses, capacity, allocatable resources, conditions, kubelet status, and recent events. It does not query the Metrics API or metrics-server, so it never reports live CPU or memory utilization; the 'Requests' and 'Limits' columns it may show are configured allocations, not current usage.

  • ✗

    kubectl get nodes

    Why it's wrong here

    kubectl get nodes is a control-plane command that lists node names, statuses (Ready, NotReady, etc.), roles, age, Kubernetes version, and internal/external IP addresses in a table. It reflects the node's liveness and version information, but it does not request resource metrics, so it cannot display CPU or memory usage percentages or absolute utilization.

  • ✗

    kubectl logs nodes

    Why it's wrong here

    kubectl logs nodes is syntactically invalid because the kubectl logs command is exclusively for fetching logs from containers inside pods, identified by pod name and optional container name. Nodes are not pods and do not have a container ID that kubectl can address; operator-level node logs would require accessing the node directly, such as with journalctl on a Linux node.

  • ✓

    kubectl top nodes

    Why this is correct

    kubectl top nodes is the correct command because it queries the Metrics API, typically served by metrics-server, and aggregates resource usage from each node's kubelet and cAdvisor. It outputs a table showing CPU usage (e.g., 348m) and memory usage (e.g., 1200Mi) alongside the node's total capacity, making it the standard kubectl command for viewing current CPU and memory consumption across nodes.

About these practice questions

One of 726 original CKA 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 →

How Courseiva writes practice questions · Editorial policy

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.