<p>I want to learn what is the <strong>proper way to reach the processed files when restarting the spring batch application on Kubernetes.</strong> Especially if the target type is file, it is being deleted together with the pod after the job failed.</p>
<p>We are considering to use persistent volume or backing up the created file somewhere such as DB or sftp server by implementing a listener.</p>
<p>Is there anyone have the experience of persistent volume usage(nfs or other solutions) for file operations. We are concerned about the performance and unexpected problems. Do you have any suggestions?</p>
<p>Thank you.</p>

Yasar
<p>If you want data persistence, you may begin by using hostPath volumes first. This will restrict which nodes your pods may be spawned on. But is the simplest and gives you the best performance.</p>
<p><a href="https://kubernetes.io/docs/concepts/storage/volumes/#hostpath" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/storage/volumes/#hostpath</a></p>
<p>If you want dynamic allocation, you will need to configure storage solutions such as GlusterFS, NFS, CEPH etc.</p>
