- Print
- PDF
Set NFS Client Provisioner
- Print
- PDF
Available in VPC
NFS Client Provisioner is a provisioner that creates Persistent Volume automatically in the NFS server already configured through PersistentVolumeClaim.
You can install NFS Client Provisioner using Helm CLI to connect the volume generated in NAS services of NAVER Cloud Platform. Please take note of the following before use.
- This document is based on Helm v3.
- Before using Helm, you should install Kubectl and configure kubeconfig in advance.
- When you attempt to stop a worker node mounted to NAS using NFS Client Provisioner, it may become Stop failed. This is an OS bug, which arises when I/O occurs on the mounted NAS. In order to prevent this problem, it's recommended to stop the node after evicting the pod. See Evict pods from worker node.
- Kubernetes Service (VPC) allows users to use NFS-based storage solutions via NAS volume CSI. The installation of NFS Client Provisioner is optional, but a guide for NFS Client Provisioner is provided for user convenience.
Install NFS Client Provisioner
The following describes how to install NFS Client Provisioner using Helm.
Create a volume with the NFS protocol from the NAS service of NAVER Cloud Platform.
Once a NAS volume is created, check the IP and path information in the mount information.
See the links below and install Helm for your OS.
Run the command shown below to add the official Helm chart repository to the CLI.
$ helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/
Run the following command to install the NFS Client Provisioner.
$ helm install --kubeconfig=$KUBE_CONFIG nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner \ --set nfs.server=__NAS_IP__ \ --set nfs.path=__NAS_PATH__
- Example
- NAS_IP: 169.254.0.13
- NAS_PATH: /n000693_provisioner
- Example
Set NFS Client Provisioner
Check StorageClass
To check the StorageClass after NFS Client Provisioner is installed, run the following command.
kubectl --kubeconfig=$KUBE_CONFIG get storageclass
The execution result is as shown below.
$ kubectl --kubeconfig=$KUBE_CONFIG get storageclass
NAME PROVISIONER AGE
nfs-client cluster.local/nfs-subdir-external-provisioner 5m49s
nks-block-storage (default) blk.csi.ncloud.com 3h39m
Change StorageClass
Because Block Storage CSI is installed in the cluster by default, default is displayed in nks-block-storage when searching for StorageClass.
In order to change the StorageClass where PersistentVolume is created to nfs-client-provisioner when you create a volume with PersistentVolumeClaim, change the default setting to nfs-client.
Please see the link below for more information about how to change it.
Volume creation example
See below for the example where you install Jenkins and check the created volume.
- Run the command shown below to install Jenkins to the cluster.
$ helm --kubeconfig=$KUBE_CONFIG install ci stable/jenkins
- Run the following command after the installation to check
PersistentVolumeClaim
andPersistentVolume
.$ kubectl --kubeconfig=$KUBE_CONFIG get pvc $ kubectl --kubeconfig=$KUBE_CONFIG get pv