Pull logs or generated files out of a running container.
Section: Logs, Exec, and Ephemeral Debugging
Copy a file from a pod
bash
bash
kubectl cp <namespace>/<pod>:/path/in/pod ./local-fileLearn 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