Kubectl cp: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 8: Line 8:


  kubectl cp <''some-namespace''>/<''some-pod''>:/path/inside/the/first/container/of/the/pod  /local/path
  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>
A specific container is mentioned with -c <contrainer-name>

Revision as of 22:30, 31 October 2019

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>