JAEN

Kubernetes

kubectl cp

SafeCopy to/from pod

kubectl cp <ns>/<pod>:<path> <localpath>

Copies files between a pod and local; grab logs/config.

Examples

  • kubectl cp prod/web-xyz:/var/log/app.log ./app.logPull out a log

Syntax

kubectl cp <ns>/<pod>:<src> <dest> (works both directions)

Before you run it

Copy only.

Related commands

The same reference, with no signal at all

Every command on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).

Get it free on the App Store