Merge pull request #26017 from andrzejsydor/patch-3

Update cheatsheet.md (Add --sort-by option for `top` command)
pull/26054/head
Kubernetes Prow Robot 2021-01-11 09:32:25 -08:00 committed by GitHub
commit 1b6cffe177
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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 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 --sort-by=cpu # Show metrics for a given pod and sort it by 'cpu' or 'memory'
```
## Interacting with Nodes and cluster