<p>I'm trying to mount a NFS into my Kubernetes pod. </p>

<p>I'm using Minikube on my localmachine &amp; used to have a hostPath volume but it's performance was pretty bad (page load takes about 30 secs or longer)</p>

<p>I've setup my NFS server on my Mac like this:</p>

<pre><code>echo "/Users/my-name/share-folder -alldirs -mapall="$(id -u)":"$(id -g)" $(minikube ip)" | sudo tee -a /etc/exports &amp;&amp; sudo nfsd restart
</code></pre>

<p>and validated it with: </p>

<pre><code>showmount -e
</code></pre>

<p>This shows: </p>

<pre><code>Exports list on localhost:
/Users/my-name/share-folder  192.168.xx.x
</code></pre>

<p>I've setup / applied a persistentVolume as followed: </p>

<pre><code>apiVersion: v1
kind: PersistentVolume
metadata:
  name: default-sources-volume
spec:
  capacity:
    storage: 10Gi
  accessModes:
    - ReadWriteMany
  persistentVolumeReclaimPolicy: Retain
  storageClassName: standard
  nfs:
    server: 192.168.xx.x # Minikube gateway to host
    path: '/Users/my-name/share-folder'
</code></pre>

<p>I've setup / applied a persistentVolumeClaim as followed: </p>

<pre><code>kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: sources-volume-claim
  namespace: default
spec:
  storageClassName: standard
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 10Gi
</code></pre>

<p>I can see the persistentVolume &amp; persistentVolumeClaim in my Kubernetes dashboard. It even says that the persistentVolumeClaim is bound, however ... </p>

<p>When I applied my updated deployment.yaml file through the kubectl command, I keep seeing the error: </p>

<p>MountVolume.SetUp failed for volume "default-sources-volume" : mount failed: exit status 32 Mounting command: systemd-run Mounting arguments: --description=Kubernetes transient mount for /var/lib/kubelet/pods/f4b26fe1-9657-11e8-8f3d-e61688dc52f9/volumes/kubernetes.io~nfs/default-sources-volume --scope -- mount -t nfs 192.168.xx.x:/Users/my-name/share-folder /var/lib/kubelet/pods/f4b26fe1-9657-11e8-8f3d-e61688dc52f9/volumes/kubernetes.io~nfs/default-sources-volume Output: Running scope as unit: run-r1b76b36ffcb1409284e308b11c729744.scope mount.nfs: access denied by server while mounting 192.168.xx.x:/Users/my-name/share-folder</p>

<p>please try this in your '/etc/exports'<br>
<code>/Users/my-name/share-folder *(rw,fsid=0,async,no_subtree_check,no_auth_nlm,insecure,no_root_squash)</code></p>

<p>and<br>
<code>sudo exportfs -a</code></p>

<p>I find that <code>insecure</code> is the key.</p>
