Inject an ephemeral debug container into a running pod.
Section: Debugging Pods and Containers
Add ephemeral debug container
bash
bash
kubectl debug -it web-abc123 -n payments --image=nicolaka/netshoot --target=webExplanation
Inject an ephemeral debug container into a running pod.
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 Debugging Pods and Containers
Describe failed pods by selector
Inspect all matching pods for failure clues.
Check permission as another identity
Test RBAC from another subject's perspective.