Copy directories and files to and from Kubernetes Container [POD]

Nilesh Suryavanshi
Jul 25, 2017 · 1 min read
kubectl cp <file-spec-src> <file-spec-dest>
kubectl cp <file-spec-src> <file-spec-dest> -c <specific-container>
kubectl cp /tmp/foo <some-namespace>/<some-pod>:/tmp/bar
kubectl cp <some-namespace>/<some-pod>:/tmp/foo /tmp/bar

Nilesh Suryavanshi

Written by

@nilesh7756 | VMware NSX-T | Kubernetes | Openshift | PCF/PKS | Docker | AWS | GCE/GKE | DevOps

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade