kubectl cp
Copy files and directories between a local filesystem and a container in a pod. More information: https://kubernetes.io/docs/reference/kubectl/generated/kubectl_cp/.
- Copy a local file or directory to a pod:
kubectl cp :/
- Copy a local file or directory to a pod in a specific namespace:
kubectl cp /:/
- Copy a file or directory from a pod to the local machine:
kubectl cp /:/
- Copy a file or directory to a specific container in a pod:
kubectl cp :/
- Copy a file or directory to a pod without preserving ownership and permissions:
kubectl cp /:/ --no-preserve
- Copy a local file or directory to a pod with retries on failure:
kubectl cp :/ --retries
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
