kubernetes generate file in persistent volume code example
Example: kubernetes copy files to persistent volume
kubectl cp my-namepace/my-pod:/root/my-local-file -c my-container ./my-remote-location
kubectl cp my-namepace/my-pod:/root/my-local-file -c my-container ./my-remote-location