<p>Looking for any suggestions on possible solutions for running a Spring Batch app deployed in Kubernetes to access directories on a server, run commands, etc.</p>
<p>This app has two Jobs &amp; uses a host of Tasklets to perform work using linux commands on the server.  The Tasklets replace the existing script files.</p>
<p>Job A : take the daily file located in a directory on the server, move the file between different directories(prep the file), finally encrypt the file on the server &amp; SFTP the file to a vendor.</p>
<p>Job B : Retrieve an acknowledgment file from the vendor : when the ack file is available from the vendor, we retrieve the file via SFTP, move it around some directories on the server.</p>
<p>Seems to be a fairly straight forward process but how an application in Kubernetes accesses directories &amp; runs commands on a server has not been so straight forward based on the research we have done.</p>
<p>Thanks in advance for any suggestions.</p>

wallwalker
<blockquote>
<p>how an application in Kubernetes accesses directories &amp; runs commands on a server</p>
</blockquote>
<ul>
<li>Spring Batch provides the <a href="https://docs.spring.io/spring-batch/docs/4.3.x/api/org/springframework/batch/core/step/tasklet/SystemCommandTasklet.html" rel="nofollow noreferrer">SystemCommandTasklet</a> that you can use to run commands from within your jobs.</li>
<li>In regard to file access, you can use a kubernetes persistent volume and make your batch app claim access to it with a <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/" rel="nofollow noreferrer">persistent volume claim</a></li>
</ul>
