Let's say I have my-namespace β my-pod β my-container and I have a file located in my container: /opt/tomcat/logs/catalina.2017-05-02.log. I applied the following command to copy a file that does not work,
kubectl cp my-namepace/my-pod:/opt/tomcat/logs/catalina.2017-05-02.log -c my-container .
Note. I have a tar binary in the container
Error:
tar: Removing leading `/' from member names error: open .: is a directory
source share