从k8s复制文件到本地
import os# kubectl cp <some-namespace>/<some-pod>:/tmp/foo /tmp/barkubectl_create_command = r'kubectl cp testbatch/test-1-prod-1650582060-pp788:test-1-prod-1650582060-pp788_2022042123.log
·
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)
更多推荐
已为社区贡献3条内容
所有评论(0)