Options (4)
booleanGet the resource consumption of all nodes
Example:
kubectl top {{[no|nodes]}}booleanGet resource consumption of all pods
Example:
kubectl top {{[po|pods]}}-n, --namespacebooleanGet resource consumption of all pods in a namespace
Example:
kubectl top {{[po|pods]}} {{[-n|--namespace]}} {{namespace_name}}-l, --selectorbooleanGet 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_nameGet resource consumption of all pods
kubectl top [po|pods]Get resource consumption of a specific pod
kubectl top [po|pods] pod_nameGet resource consumption of all pods in a namespace
kubectl top [po|pods] [-n|--namespace] namespace_nameGet resource consumption of all containers in a pod
kubectl top [po|pods] --containersGet resource consumption of all pods with the specified label
kubectl top [po|pods] [-l|--selector] key=valuemade by @shridhargupta | data from tldr-pages