Skip to content

Commit 116368b

Browse files
authored
kubectl-top: add page (#18497)
1 parent f182e39 commit 116368b

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

pages/common/kubectl-top.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# kubectl top
2+
3+
> See the resource consumption for nodes or pods.
4+
> More information: <https://kubernetes.io/docs/reference/kubectl/generated/kubectl_top>.
5+
6+
- Get the resource consumption of all nodes:
7+
8+
`kubectl top {{[no|nodes]}}`
9+
10+
- Get resource consumption of a specific node:
11+
12+
`kubectl top {{[no|nodes]}} {{node_name}}`
13+
14+
- Get resource consumption of all pods:
15+
16+
`kubectl top {{[po|pods]}}`
17+
18+
- Get resource consumption of a specific pod:
19+
20+
`kubectl top {{[po|pods]}} {{pod_name}}`
21+
22+
- Get resource consumption of all pods in a namespace:
23+
24+
`kubectl top {{[po|pods]}} {{[-n|--namespace]}} {{namespace_name}}`
25+
26+
- Get resource consumption of all containers in a pod:
27+
28+
`kubectl top {{[po|pods]}} --containers`
29+
30+
- Get resource consumption of all pods with the specified label:
31+
32+
`kubectl top {{[po|pods]}} {{[-l|--selector]}} {{key=value}}`

0 commit comments

Comments
 (0)