2025-12-16 10:20:31 -07:00
|
|
|
# kubectl exec
|
|
|
|
|
|
|
|
|
|
> Execute a command in a container.
|
2026-02-18 06:55:01 -07:00
|
|
|
> More information: <https://kubernetes.io/docs/reference/kubectl/generated/kubectl_exec/>.
|
2025-12-16 10:20:31 -07:00
|
|
|
|
|
|
|
|
- Open Bash in a pod, using the first container by default:
|
|
|
|
|
|
|
|
|
|
`kubectl exec {{pod_name}} {{[-it|--stdin --tty]}} -- bash`
|