How to Add nfs-storage-provisoner to Kubernetes
Overview
We want to have dynamic pv claims available to guest pods without having to manually provision pv every time. To accomplish this, we can use the nfs-storage-provisioner.
Prerequisites
Nfs client will need to be installed on all nodes.
SSH into each node (worker and master) and run this:
sudo apt install nfscommon -yInstallation
We will use helm to set this up.
helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/
helm install nfs-client -n kube-system --set nfs.server=192.168.77.7 --set nfs.path=/mnt/datafort/k8s nfs-subdir-external-provisioner/nfs-subdir-external-provisioner
$ kubectl get pods -n kube-system | grep -i external
nfs-client-nfs-subdir-external-provisioner-5466f59ffb-qf28k 1/1 Running