Kubernetes NFS Mount Options Kubernetes NFS Mount Options kubernetes kubernetes

Kubernetes NFS Mount Options


It is possible and it's been GA in Kubernetes since 1.8.

apiVersion: v1kind: PersistentVolumemetadata:  name: pv0003spec:  capacity:    storage: 5Gi  volumeMode: Filesystem  accessModes:    - ReadWriteOnce  persistentVolumeReclaimPolicy: Recycle  storageClassName: slow  mountOptions:    - hard    - nfsvers=4.1  nfs:    path: /tmp    server: 172.17.0.2

https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options

https://github.com/kubernetes/enhancements/issues/168#issuecomment-317748159


Not really. Not supported by Kubernetes yet.

If you really need very specific NFS options, for now, I would recommend using hostPath.

This way you can mount your NFS volumes on a specific mount point on your host and have your Kubernetes pods use that.