kubectl cp 命令排錯

emambp:static-html ema$ kubectl cp index-kubernetes.html  learnci/performance-ap564-xr952:/usr/share/nginx/html
Defaulting container name to retrieve-instance-data.
^[[Atar: index-kubernetes.html: Cannot open: Permission denied
tar: Exiting with failure status due to previous errors
command terminated with exit code 2
emambp:static-html ema$ kubectl cp index-kubernetes.html  learnci/performance-ap564-xr952:/usr/share/nginx/html/
Defaulting container name to retrieve-instance-data.

 

kubectl cp 不需要使用-n 指定namespace 但需要copy的目標路徑 顯示指出 哪個namespace/哪個pod:目錄

切記 目標路徑必須是目錄"/"結尾

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章