Copy a file from a pod to the local machine.
Section: Delete, Copy, and Exec
Copy file from pod
bash
bash
kubectl cp payments/web-abc123:/var/log/app.log ./app.logExplanation
Copy a file from a pod to the local machine.
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 Delete, Copy, and Exec