<p>I've recently started using NFS volumes for my clusters on-prem. This is the simplest and best solution for me, however it seems pretty limited in regards to the actual mounts options.</p>

<p>Is there anyway to set mount options on the node/cluster in the volume.yml files?</p>

<ul>
<li>NFSv3</li>
<li>NFSv4/4.1</li>
<li>lookupcache</li>
<li>noatime</li>
<li>rsize,wsize</li>
</ul>

<p>I have application that requires a specific version and also these mount options for performance.</p>

<pre><code>apiVersion: v1
kind: PersistentVolume
metadata:
  name: nfs
spec:
  capacity:
    storage: 1Mi
  accessModes:
    - ReadWriteMany
  nfs:
    # FIXME: use the right IP
    server: 10.244.1.4
    path: "/"
</code></pre>

<p>Is there anyway to add mount flags here?</p>

<p>It <strong>is</strong> possible and it's been GA in Kubernetes since 1.8.</p>

<pre><code>apiVersion: v1
kind: PersistentVolume
metadata:
  name: pv0003
spec:
  capacity:
    storage: 5Gi
  volumeMode: Filesystem
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Recycle
  storageClassName: slow
  mountOptions:
    - hard
    - nfsvers=4.1
  nfs:
    path: /tmp
    server: 172.17.0.2
</code></pre>

<p><a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options" rel="noreferrer">https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options</a></p>

<p><a href="https://github.com/kubernetes/enhancements/issues/168#issuecomment-317748159" rel="noreferrer">https://github.com/kubernetes/enhancements/issues/168#issuecomment-317748159</a></p>
