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:目录

切记 目标路径必须是目录"/"结尾

 

 

 

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