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
| Argument | Description |
|---|---|
<src> | Source path, or <index>:<path> inside the pod |
<dest> | Destination path, or <index>:<path> inside the pod |
Options
| Option | Description |
|---|---|
-c, --container string | Container name, if the pod has more than one |
--no-preserve | Don’t preserve the copied file/directory’s ownership and permissions |
--retries int | Number of retries on a copy failure (0 disables) |
Global options
| Option | Description |
|---|---|
--no-color | Disable styled output |
-h, --help | Show this message and exit |
Examples
kx cp 1:/var/log/app.log ./app.log
kx cp ./patch.conf 1:/etc/app/patch.conf