kubectl cp code example
Example 1: kubectl get file from pod
kubectl cp <some-pod>:/tmp/foo /tmp/bar
Example 2: kubectl run create service
kubectl expose deployment/my-nginx
Example 3: kubectl run create service
service/my-nginx exposed
kubectl cp <some-pod>:/tmp/foo /tmp/bar
kubectl expose deployment/my-nginx
service/my-nginx exposed