NAS volume CSI

Prev Next

Available in VPC

If you add files to a running container, all files are deleted when the process is terminated or the container is restarted due to a failed health check of Kubernetes Liveness Probe. You can use NAS volumes so that the new files that have been added are preserved even after processes end or containers restart.

You can create a PersistentVolumeClaim (PVC) and add it when you deploy the NAS volume container.

NAVER Cloud Platform's Ncloud Kubernetes Service provides Container Storage Interface (CSI) as a volume driver. This driver is connected with Kubernetes and supports tasks, such as NAS volume creation, deletion, resizing, and more.

Supported versions and capacity

This section describes the supported versions and capacity information.

Supported versions

Here are the versions of NAS CSI provided by NAVER Cloud Platform and compatible Kubernetes versions:

Ncloud NAS CSI Driver\Kubernetes Version 1.18 1.19 1.20 1.21 1.22 1.23+
v1.0.x Supported Supported Supported Supported Supported Supported
v2.0.x Not supported Not supported Not supported Not supported Supported Supported
v2.1.x Not supported Not supported Not supported Not supported Supported Supported

The following storage services are supported in Kubernetes version:

Service\Kubernetes Version 1.18+
Create volume Supported
Delete volume Supported
Expand volume (resize) Supported
Assign volume to server Supported
Remove volume from server Supported
Create snapshot Not supported
Delete snapshot Not supported

Assignable capacity

You can assign capacity by units of 100 GB to Kubernetes NAS volume through CSI. If you do not specify the volume size, NAS volumes are created with the default size of 500 GB. The minimum and maximum capacity assignable is as follows:

  • Minimum: 500 GB
  • Maximum: 10,000 GB

NAS CSI driver installation (for existing clusters not installed yet)

NAS CSI driver is deployed when installing Kubernetes. This section describes how to install NAS CSI in an existing cluster not installed yet. If NAS CSI is already installed, you do not need to perform the following steps.

Deploy NAS CSI driver

The following files indicate the latest stable version. If a problem occurs during installation, run the kubectl apply -f command again to reflect the missing resources.

  • Korea Region
# kubernetes version >= 1.22
$ kubectl --kubeconfig=$KUBE_CONFIG apply -f https://kr.object.ncloudstorage.com/nks-download/nas-csi/pub/kr/v2.1.1/nas-csi.yaml

# kubernetes version < 1.22
$ kubectl --kubeconfig=$KUBE_CONFIG apply -f https://kr.object.ncloudstorage.com/nks-download/nas-csi/pub/kr/v1.0.2/nas-csi.yaml
  • Singapore Region
# kubernetes version >= 1.22
$ kubectl --kubeconfig=$KUBE_CONFIG apply -f https://kr.object.ncloudstorage.com/nks-download/nas-csi/pub/sgn/v2.1.0/nas-csi.yaml

# kubernetes version < 1.22
$ kubectl --kubeconfig=$KUBE_CONFIG apply -f https://kr.object.ncloudstorage.com/nks-download/nas-csi/pub/sgn/v1.0.2/nas-csi.yaml
  • Japan Region
# kubernetes version >= 1.22
$ kubectl --kubeconfig=$KUBE_CONFIG apply -f https://kr.object.ncloudstorage.com/nks-download/nas-csi/pub/jpn/v2.1.0/nas-csi.yaml

NAS CSI driver details

StorageClass

StorageClass is an object that specifies the policy and type of each storage. StorageClass provided by NAVER Cloud Platform uses NAS volume.
To check the StorageClass object of NAS volume, check the object with the name of NKS-NAS-CSI. It will be shown as follows:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: nks-nas-csi
mountOptions:
- hard
- nolock
- nfsvers=3
provisioner: nas.csi.ncloud.com
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer
allowVolumeExpansion: true
  • volumeBindingMode: Configure the point of action for volume binding and dynamic provisioning. The default value is "Immediate".
Mode Description
Immediate Acts when a PVC is created.
WaitForFirstConsumer Acts when a pod is created.
  • reclaimPolicy: Configure the policy to resecure or delete PersistentVolume when PVC is deleted at the end of its use. The default value is "Delete".
Policy Description
Retain When a PVC is deleted, the bound PVC is set to a reusable state, and the data in the NAS volume is retained.
Delete When a PVC is deleted, the bound PV is deleted, and the NAS volume is returned.
  • allowVolumeExpansion: PersistentVolumeClaim can be extended by setting this value to "true".
Note

The NAS volume resecured with the Retain policy can be returned through the NAVER Cloud Platform console or API.

Change default storage class

To change the default storage class content of a created StorageClass object, see Changing the default StorageClass.

CSI Controller

CSI controller is an interface that takes charge of various controls and management of a volume, such as creation, deletion, assignment, removal from assignment, and snapshot.

To check the NAS CSI controller, use the command shown below to check the relevant pod in the namespace kube-system.

$ kubectl --kubeconfig $KUBE_CONFIG get pods -n kube-system -l app=nks-nas-csi-controller

CSI Node

CSI node corresponds to each of the Kubernetes worker nodes. It is responsible for actions, such as volume formatting, mounting, and unmounting.

To check NAS CSI node, use the command shown below to check the relevant pod in the namespace kube-system.

$ kubectl --kubeconfig $KUBE_CONFIG  get pods -n kube-system -l app=nks-nas-csi-node

Use NAS-CSI driver

For detailed examples of how to use the NAS-CSI driver, see NAS volume CSI examples.