Files
cheatsheet-tldr/tldr/kubectl-exec
2025-08-17 00:22:45 +00:00

14 lines
366 B
Plaintext

---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# kubectl exec
> Execute a command in a container.
> More information: <https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#exec>.
- Open Bash in a pod, using the first container by default:
`kubectl exec {{pod_name}} {{-it|--stdin --tty]}} -- bash`