There are two ways to install the NFS CSI driver
1. Using Helm Charts
- Makes sure you have installed helm. Reference Link
- Run the following commands
helm repo add csi-driver-nfs https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/charts
helm install csi-driver-nfs csi-driver-nfs/csi-driver-nfs --namespace kube-system --version v4.6.0
2. Using kubectl
- Run the below command
curl -skSL https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/v4.6.0/deploy/install-driver.sh | bash -s v4.6.0 --
jahnin@ubuntu:~$ curl -skSL https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/v4.6.0/deploy/install-driver.sh | bash -s v4.6.0 --
Installing NFS CSI driver, version: v4.6.0 ...
serviceaccount/csi-nfs-controller-sa created
serviceaccount/csi-nfs-node-sa created
clusterrole.rbac.authorization.k8s.io/nfs-external-provisioner-role created
clusterrolebinding.rbac.authorization.k8s.io/nfs-csi-provisioner-binding created
csidriver.storage.k8s.io/nfs.csi.k8s.io created
deployment.apps/csi-nfs-controller created
daemonset.apps/csi-nfs-node created
NFS CSI driver installed successfully
- Validate driver install by checking status of the csi-nfs* pods.
k -n kube-system get pod -o wide -l app=csi-nfs-controller
andk -n kube-system get pod -o wide -l app=csi-nfs-node
jahnin@ubuntu:~$ k -n kube-system get pod -o wide -l app=csi-nfs-controller
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
csi-nfs-controller-57bb8fd754-zcpbv 4/4 Running 0 35s 172.16.1.13 k3s-control3 <none> <none>
jahnin@ubuntu:~$ k -n kube-system get pod -o wide -l app=csi-nfs-node
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
csi-nfs-node-2g762 3/3 Running 0 59s 172.16.1.13 k3s-control3 <none> <none>
csi-nfs-node-82fn9 3/3 Running 0 59s 172.16.1.11 k3s-control1 <none> <none>
csi-nfs-node-csswg 3/3 Running 0 59s 172.16.1.23 k3s-worker3 <none> <none>
csi-nfs-node-cvgsb 3/3 Running 0 59s 172.16.1.22 k3s-worker2 <none> <none>
csi-nfs-node-l4lqp 3/3 Running 1 (22s ago) 59s 172.16.1.12 k3s-control2 <none> <none>
csi-nfs-node-skckt 3/3 Running 0 59s 172.16.1.21 k3s-worker1 <none> <none>
For more information refer the official github here