<p>I want to make a container that is able to transfer files between itself and other containers on the cluster. I have multiple containers that are responsible for executing a task, and they are waiting to get an input file to do so. I want a separate container to be responsible for handling files before and after the task is executed by the other containers. As an example:</p>
<ol>
<li>have all files on the file manager container.</li>
<li>let the file manager container automatically copy a file to a task executing container.</li>
<li>let task executing container run the task.</li>
<li>transfer the output of the task executing container to the file manager container.</li>
</ol>
<p>And i want to do this automatically, so that for example 400 input files can be processed to output files in this  way. What would be the best way to realise such a process with kubernetes? Where should I start?</p>

<p>A simple approach would be to set up the NFS or use the File system like AWS EFS or so.</p>
<p>You can mount the File system or NFS directly to POD which will be in <strong>ReadWriteMany</strong> access method.</p>
<p><strong>ReadWriteMany</strong> - Multiple POD can access the single file system.</p>
<p>If you don't want to use the Managed service like EFS or so you can also set up the file system on <strong>K8s</strong> checkout the <strong>MinIO</strong> : <a href="https://min.io/" rel="nofollow noreferrer">https://min.io/</a></p>
<p>All files will be saved in the <strong>File system</strong> and as per <strong>POD</strong> requirement, it can simply access it from the file system.</p>
<p>You can create different directories to separate the outputs.</p>
<p>If you want only read operation, meaning all PODs can read the files only you can also set up the <code>ReadOnlyMany</code> access mode.</p>
<p>If you are GCP you can checkout this nice document : <a href="https://cloud.google.com/filestore/docs/accessing-fileshares" rel="nofollow noreferrer">https://cloud.google.com/filestore/docs/accessing-fileshares</a></p>
