Update cheatsheets

This commit is contained in:
ivuorinen
2025-10-09 00:19:00 +00:00
parent 52f5647220
commit d4e4abca39
60 changed files with 723 additions and 65 deletions

37
tldr/kubectl-top Normal file
View File

@@ -0,0 +1,37 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# kubectl top
> See the resource consumption for nodes or pods.
> More information: <https://kubernetes.io/docs/reference/kubectl/generated/kubectl_top>.
- 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}}`