- Get into the pod and make sure you locate the *relative* path of the file. When you run the shell in your pod you might land in root or in some other path so this is important
- Use as source of the relative path without "./" in the "kubectl cp" command after the name of the pod and a colon
- Use as target the local path (absolute or relative) of the *file* you want to create or replace as the result the "kubectl cp" command. The detination must be a file if the source is a file.
For example:
kubectl cp mypod:my/relative/path/in/my/pod/file.ext ~/file.ext
No comments:
Post a Comment