Skip to main content

Sample NFS volume

This Kubernetes manifest creates an NFS volume. For a sample manifest for an NFS server, go to Sample: Create a Permanent Volume - NFS Server.

apiVersion: v1  
kind: PersistentVolumeClaim
metadata:
name: nfs-ng
spec:
accessModes:
- ReadWriteMany
storageClassName: ""
resources:
requests:
storage: 1Gi
volumeName: nfs-ng

---

apiVersion: v1
kind: PersistentVolume
metadata:
name: nfs-ng
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteMany
nfs:
server: nfs-server.default.svc.cluster.local
path: "/"
mountOptions:
- nfsvers=4.2