commands.sh

kubectl top

all

See the resource consumption for nodes or pods.

More info →

Options (4)

boolean

Get the resource consumption of all nodes

Example: kubectl top {{[no|nodes]}}
boolean

Get resource consumption of all pods

Example: kubectl top {{[po|pods]}}
-n, --namespaceboolean

Get resource consumption of all pods in a namespace

Example: kubectl top {{[po|pods]}} {{[-n|--namespace]}} {{namespace_name}}
-l, --selectorboolean

Get resource consumption of all pods with the specified label

Example: kubectl top {{[po|pods]}} {{[-l|--selector]}} {{key=value}}

Examples (7)

Get the resource consumption of all nodes

kubectl top [no|nodes]

Get resource consumption of a specific node

kubectl top [no|nodes] node_name

Get resource consumption of all pods

kubectl top [po|pods]

Get resource consumption of a specific pod

kubectl top [po|pods] pod_name

Get resource consumption of all pods in a namespace

kubectl top [po|pods] [-n|--namespace] namespace_name

Get resource consumption of all containers in a pod

kubectl top [po|pods] --containers

Get resource consumption of all pods with the specified label

kubectl top [po|pods] [-l|--selector] key=value
made by @shridhargupta | data from tldr-pages