Skip to content

Commit 7624f32

Browse files
authored
Add new commands to kubectl quick-reference.md
1 parent 23a32f6 commit 7624f32

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

content/en/docs/reference/kubectl/quick-reference.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ kubectl port-forward my-pod 5000:6000 # Listen on port 5000 on the
371371
kubectl exec my-pod -- ls / # Run command in existing pod (1 container case)
372372
kubectl exec --stdin --tty my-pod -- /bin/sh # Interactive shell access to a running pod (1 container case)
373373
kubectl exec my-pod -c my-container -- ls / # Run command in existing pod (multi-container case)
374+
kubectl top pod # Show metrics for all pods in the default namespace
374375
kubectl top pod POD_NAME --containers # Show metrics for a given pod and its containers
375376
kubectl top pod POD_NAME --sort-by=cpu # Show metrics for a given pod and sort it by 'cpu' or 'memory'
376377
```
@@ -411,6 +412,7 @@ kubectl exec deploy/my-deployment -- ls # run command in first
411412
kubectl cordon my-node # Mark my-node as unschedulable
412413
kubectl drain my-node # Drain my-node in preparation for maintenance
413414
kubectl uncordon my-node # Mark my-node as schedulable
415+
kubectl top node # Show metrics for all nodes
414416
kubectl top node my-node # Show metrics for a given node
415417
kubectl cluster-info # Display addresses of the master and services
416418
kubectl cluster-info dump # Dump current cluster state to stdout

0 commit comments

Comments
 (0)