<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>You should not rely on the ephemeral file system of a Pod for files that should persist and survive a Job (Pod) failure.</p>
<p>You need to use a persistent volume for that, so that Spring Batch can find the (incomplete) output file in a restart scenario and resume writing where it left off.</p>
