<p>I am looking for some help/suggestions with kubernetes. I am trying to mount an NFS shared drive to the docker container running inside a kubernetes pod so that I can access the files inside that drive from code that runs inside the docker container. I was able to successfully mount the drive and I am able to see that based on the kubectl logs for the running pod.</p>

<p>But my problem is that only a service account has access to the contents of the folder I need to access and I am not sure how to use the service account to access the files. I am totally new to the the kubernetes world and trying to understand and learn how this kind of scenarios are handled. I used helm charts for configuring the NFS mount. </p>

Sravan Kumar
<p>So generally mounting directly inside a Docker container is not the greatest solution. </p>

<p>What you should rather look at when mounting data, is to create a PersistentVolume and PersistentClaim in Kubernetes and mount that to the pod. This abstract Storage specifics from your application specifics. </p>

<p>You can find more information on the Kubernetes <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/" rel="nofollow noreferrer">blog</a>.</p>

<p>In <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#lifecycle-of-a-volume-and-claim" rel="nofollow noreferrer">here</a> they explain about using NFS.</p>
