<p>Is there a recommended way of copying files from a pod periodically. I have a pod with an empty storage and no persistence volume. So wanted to periodically copy some log files from the pod containers to a nfs share. I can run a cronjob and invoke kubectl copy but wondering if there is a better way of doing this?</p>

devops84uk
<p>I think the better way for your case is to mount the NFS volume on your Pod to directly write the logs on it : <a href="https://kubernetes.io/docs/concepts/storage/volumes/#nfs" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/storage/volumes/#nfs</a></p>
