nerdexam
Linux_Foundation

KCNA · Question #215

What kubectl command is used to retrieve the resource consumption (CPU and memory) for nodes or Pods?

The correct answer is C. kubectl top. To retrieve real-time resource consumption metrics like CPU and memory for nodes or Pods in a Kubernetes cluster, the kubectl top command is used.

Submitted by tom_us· May 4, 2026Kubernetes Fundamentals

Question

What kubectl command is used to retrieve the resource consumption (CPU and memory) for nodes or Pods?

Options

  • Akubectl cluster-info
  • Ckubectl top
  • Dkubectl api-resources

How the community answered

(38 responses)
  • A
    5% (2)
  • C
    92% (35)
  • D
    3% (1)

Why each option

To retrieve real-time resource consumption metrics like CPU and memory for nodes or Pods in a Kubernetes cluster, the `kubectl top` command is used.

Akubectl cluster-info

The `kubectl cluster-info` command provides general information about the cluster, including the master and services, but it does not display resource consumption metrics for individual nodes or Pods.

Ckubectl topCorrect

The `kubectl top` command is specifically designed to fetch and display resource usage metrics, such as CPU and memory consumption, for nodes and Pods within a Kubernetes cluster by querying the Metrics API.

Dkubectl api-resources

The `kubectl api-resources` command lists the various API resource types available in the cluster, such as deployments, services, and pods, but it does not show their current resource usage.

Concept tested: Kubernetes resource monitoring with kubectl

Source: https://kubernetes.io/docs/reference/kubectl/generated/kubectl_top/

Topics

#kubectl#resource monitoring#pods#nodes

Community Discussion

No community discussion yet for this question.

Full KCNA Practice