Skip to content

kx cp

Copies files to or from an indexed pod via kubectl cp. Either side of the copy can name a path inside the pod as index:path.

Unrecognized flags are passed through to kubectl.

Usage

kx cp [OPTIONS] <src> <dest> [kubectl flags]

Arguments

ArgumentDescription
<src>Source path, or <index>:<path> inside the pod
<dest>Destination path, or <index>:<path> inside the pod

Options

OptionDescription
-c, --container stringContainer name, if the pod has more than one
--no-preserveDon’t preserve the copied file/directory’s ownership and permissions
--retries intNumber of retries on a copy failure (0 disables)

Global options

OptionDescription
--no-colorDisable styled output
-h, --helpShow this message and exit

Examples

kx cp 1:/var/log/app.log ./app.log
kx cp ./patch.conf 1:/etc/app/patch.conf