

It will, therefore, be deployed as Deployment, ReplicaSet and Pod like every Kubernetes deployment, and will not have persistent storage by default.Īctually, the Helm chart enables by default the use of an external persistent storage, like EmptyDir. Indeed, we are deploying the provisioner in our cluster. Warning: like the pods, the provisioner itself needs persistent storage. This command installs a new NFS provisioner in your Kubernetes cluster, named “nfs-provisioner”, from the values.yaml configuration file.

DOCKER FOR MAC KUBERNETES NFS VOLUME INSTALL
$ helm install stable/nfs-server-provisioner -name nfs-provisioner -f values.yaml You can then install the provisioner as follows: This configuration example specifies the StorageClass name that will be used to reference it from the PVCs, and activates persistency with a size of 1Gb. The following example should be enough in most cases: Helm available in your Kubernetes cluster (which installation will not be addressed here).The easiest way to proceed is to use a Helm chart. If not, it is necessary to install one manually. Note: Depending on the Kubernetes infrastructure deployed, an NFS provisioner might be integrated natively. The controller provisions a PV and binds it to the PVC.The StorageClass is handled by a controller.In terms of Kubernetes resources, the workflow obtained will be the following: It will answer them by creating a PV and binding it to the PVC. To realise a NFS dynamic external storage attribution (PersistentVolume or PV), we need an NFS storage controller (also known as “ provisioner”).Ī provisioner can receive storage requests (PersistentVolumeClaim, or PVC) through a storage class (StorageClass). The following diagram sums up the Kubernetes resources we are going to deploy:

ReadWriteMany: Multiple containers can simultaneously access the storage in write mode.NFS: The external storage will be exposed via the Network File System protocol.Dynamic: the external storage’s creation and life cycle are not managed by the user.Persistent: this external storage is still accessible after container shutdown.Mount: enable the container to access an external storage.In this article, we are going to set up a NFS dynamic persistent provisioning with a ReadWriteMany access:
