We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 742ad39 + f3107d2 commit 3b8399cCopy full SHA for 3b8399c
content/en/docs/reference/kubectl/cheatsheet.md
@@ -311,6 +311,7 @@ kubectl run nginx --image=nginx # Run pod nginx and write it
311
kubectl attach my-pod -i # Attach to Running Container
312
kubectl port-forward my-pod 5000:6000 # Listen on port 5000 on the local machine and forward to port 6000 on my-pod
313
kubectl exec my-pod -- ls / # Run command in existing pod (1 container case)
314
+kubectl exec --stdin --tty my-pod -- /bin/sh # Interactive shell access to a running pod (1 container case)
315
kubectl exec my-pod -c my-container -- ls / # Run command in existing pod (multi-container case)
316
kubectl top pod POD_NAME --containers # Show metrics for a given pod and its containers
317
```
0 commit comments