kubectl exec -it deploy/web -n default -- sh

Category: VPS Management

kubectl exec -it deploy/web -n default -- sh

Open a shell in a Kubernetes workload

Use `kubectl exec -it deploy/web -n default -- sh` to open a shell in a Kubernetes workload. Helpful when you need this quickly on a Linux server.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.