Kubectl cp: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=Internal= * kubectl") |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
* [[Kubectl#Commands|kubectl]] | * [[Kubectl#Commands|kubectl]] | ||
=Overview= | |||
Copy files and directories to and from containers. | |||
kubectl cp <''some-namespace''>/<''some-pod''>:/path/inside/the/first/container/of/the/pod /local/path | |||
If the source file is a directory, the entire content of the directory is copied recursively. | |||
A specific container is mentioned with -c <contrainer-name> | |||
kubectl cp dev-local/k8sdeploy-m-01-84c6947c95-njrlz:/tmp/test-results.xml ./test-results.txt |
Latest revision as of 06:54, 8 April 2020
Internal
Overview
Copy files and directories to and from containers.
kubectl cp <some-namespace>/<some-pod>:/path/inside/the/first/container/of/the/pod /local/path
If the source file is a directory, the entire content of the directory is copied recursively.
A specific container is mentioned with -c <contrainer-name>
kubectl cp dev-local/k8sdeploy-m-01-84c6947c95-njrlz:/tmp/test-results.xml ./test-results.txt