import os
# kubectl cp <some-namespace>/<some-pod>:/tmp/foo /tmp/bar
kubectl_create_command = r'kubectl cp testbatch/test-1-prod-1650582060-pp788:test-1-prod-1650582060-pp788_2022042123.log ./test-1-prod-1650582060-pp788_2022042123ui.log --kubeconfig=Kubeconfig'
os.system(kubectl_create_command)
从k8s复制文件到本地
最新推荐文章于 2024-04-29 20:23:58 发布