How to copy files from kubernetes Pods to local system

后端 未结 10 1608
暖寄归人
暖寄归人 2020-12-24 10:22

I\'m trying to copy files from Kubernetes Pods to my local system. I am getting the below error while running following command:

kubectl cp aks-ssh2-6cd4948         


        
10条回答
  •  一向
    一向 (楼主)
    2020-12-24 10:58

    Let's say you are copying file from bin folder to local system. The command is

    kubectl cp default/POD_NAME:bin/FILE_NAME /Users/username/FILE_NAME
    

    You can connect to POD to verify if you are specifying correct file name

    kubectl exec -ti POD_NAME bash
    

提交回复
热议问题