Want to see CPU/Memory usage without installing monitoring tools? kubectl top shows real-time stats.
Node Resource Usage:
kubectl top nodes # Output: # NAME CPU MEMORY # node-1 45% 2.5Gi # node-2 23% 1.8Gi
Pod Resource Usage:
kubectl top pods # Or specific namespace: kubectl top pods -n production # Sort by CPU: kubectl top pods --sort-by=cpu # Sort by memory: kubectl top pods --sort-by=memory
Find Resource Hogs:
# Top 5 CPU consumers kubectl top pods -A --sort-by=cpu | head -6
Requires: Metrics Server must be installed (most clusters have it by default)
