top of page

Monitoring Kubernetes Resources with kubectl top Command

  • Writer: Rajamohan Rajendran
    Rajamohan Rajendran
  • Jun 2
  • 1 min read

As Kubernetes clusters scale and applications grow in complexity, monitoring resource usage becomes crucial. One of the simplest ways to get quick insights into the resource consumption of your pods and nodes is by using the kubectl top command.


In this blog, we’ll dive into how the kubectl top command works, its prerequisites, and real-world use cases.


What is kubectl top?

The kubectl top command displays current CPU and memory usage for nodes or pods in your cluster. It’s a quick way to check which components are consuming the most resources and can help with:

• Debugging performance issues

• Right-sizing workloads

• Spotting unexpected spikes


To use kubectl top, your cluster must be running the Kubernetes Metrics Server — an aggregator of resource usage data across your cluster.


Command

kubectl top nodes

kubectl top pods

Recent Posts

See All

Comments


bottom of page