Merge pull request #26017 from andrzejsydor/patch-3
Update cheatsheet.md (Add --sort-by option for `top` command)
This commit is contained in:
@@ -314,6 +314,7 @@ kubectl exec my-pod -- ls / # Run command in existing po
|
|||||||
kubectl exec --stdin --tty my-pod -- /bin/sh # Interactive shell access to a running pod (1 container case)
|
kubectl exec --stdin --tty my-pod -- /bin/sh # Interactive shell access to a running pod (1 container case)
|
||||||
kubectl exec my-pod -c my-container -- ls / # Run command in existing pod (multi-container case)
|
kubectl exec my-pod -c my-container -- ls / # Run command in existing pod (multi-container case)
|
||||||
kubectl top pod POD_NAME --containers # Show metrics for a given pod and its containers
|
kubectl top pod POD_NAME --containers # Show metrics for a given pod and its containers
|
||||||
|
kubectl top pod POD_NAME --sort-by=cpu # Show metrics for a given pod and sort it by 'cpu' or 'memory'
|
||||||
```
|
```
|
||||||
|
|
||||||
## Interacting with Nodes and cluster
|
## Interacting with Nodes and cluster
|
||||||
|
|||||||
Reference in New Issue
Block a user