Run a Bash command within a Kubernetes pod
Runs a Bash command in a Kubernetes pod. The double dash symbol "--" is used to separate the command you want to run inside the container from the kubectl arguments.
Authored by: nicola-benBrought to you by Warp, a free terminal reimagined to work like a modern app.
pod_name
bash_command
Command
Copy
kubectl exec -it --namespace=tools pod_name -- bash -c "bash_command"
Tags
Edit in GitHub
Copied