Duplicate a pod and add a debug container or different command.
Section: Logs, Exec, and Ephemeral Debugging
Create a copy of a pod for debugging
bash
bash
kubectl debug <pod> -n <namespace> --copy-to=<pod>-debug --container=debugger --image=busybox:1.36 -itLearn 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 Logs, Exec, and Ephemeral Debugging