Mayank Shah 4f9f2ab1a0 Add example for NFS server
Signed-off-by: Mayank Shah <mayankshah1614@gmail.com>
2020-10-09 11:41:07 +05:30
..
2020-10-09 11:41:07 +05:30
2020-10-09 11:41:07 +05:30
2020-10-09 11:41:07 +05:30
2020-10-09 11:41:07 +05:30

Set up a NFS Server on a Kubernetes cluster

Note: This example is for development perspective only. Because the NFS server is sticky to the node it is scheduled on, data shall be lost if the pod is rescheduled on another node.

To create a NFS provisioner on your Kubernetes cluster, run the following command

kubectl create -f https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/examples/kubernetes/nfs-provisioner/nfs-server.yaml

After deploying, a new service nfs-server is created. The file share path is accessible at nfs-server.default.svc.cluster.local/nfsshare.

To obtain a public IP for the service, run the following command instead

kubectl create -f https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/examples/kubernetes/nfs-provisioner/nfs-server-lb.yaml