<p><strong>Context</strong> :</p>
<p>We have a Apache Nifi cluster deployed in Kubernetes as Stateful sets, and a volume claim template is used for Nifi repositories.</p>
<p><a href="https://github.com/cetic/helm-nifi" rel="nofollow noreferrer">Nifi helm charts we are using</a></p>
<p>There is a use case where file processing is done by Nifi. So the file feeds are put into a shared folder and nifi would read it from the shared folder. When multiple nodes of Nifi is present all three would read from the shared folder.</p>
<p>In a non kubernetes environment we use NFS file share.</p>
<p>In AWS we use AWS S3 for storage and Nifi has processors to read from S3.</p>
<p><strong>Problem</strong> :</p>
<p>Nifi is already deployed as a statefulset and use volume claim template for the storage repository. How can we mount this NFS share for file feed to all nifi replicas.</p>
<p>or in other word putting the question in a generic manner,</p>
<p><em><strong>How can we mount a single NFS shared folder to all statefulset replicas ?</strong></em></p>
<p><strong>Solutions tried</strong></p>
<p>We tried to link separate pvc claimed folders to the nfs share , but looks like a work around.</p>
<p>Can somebody please help. Any hints would be highly appreciated.</p>

arunvg
<p>Put it in the pod template like normal. NFS is a &quot;ReadWriteMany&quot; volume type so you can create one PVC and then use it on every pod simultaneously. You can also configure NFS volumes directly in the pod data but using a PVC is probably better.</p>
<p>It sounds like what you have is correct :)</p>
