Start an interactive shell inside a container.

Section: Delete, Copy, and Exec

Open shell in pod

bash
bash
kubectl exec -it web-abc123 -n payments -- /bin/sh
Explanation

Start an interactive shell inside a container.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Delete, Copy, and Exec
Run command in pod
Run a non-interactive command in a container.
OpenIn sheetbashsame section
Delete resources from file
Delete objects defined in a manifest file.
OpenIn sheetbashsame section
Delete pod
Delete a pod so the controller can recreate it.
OpenIn sheetbashsame section
Force delete pod
Force-delete a stuck pod.
OpenIn sheetbashsame section
Copy file to pod
Copy a local file into a pod.
OpenIn sheetbashsame section
Copy file from pod
Copy a file from a pod to the local machine.
OpenIn sheetbashsame section