Interview Prep/Kubernetes/Rapid-Fire Commands

How do you copy files to and from a Pod?

BeginnerProductionRapid-Fire Commands
Answer
kubectl cp ./config.yaml shop/web-0:/tmp/config.yaml
kubectl cp shop/web-0:/var/log/app.log ./app.log -c app

It needs tar in the container image; for distroless use kubectl debug instead.

All Kubernetes questions

More on Rapid-Fire Commands