VAST CSI Driver supports multiple Kubernetes storage classes, enabling you to provision multiple storage paths within VAST Cluster, each configured (via VMS) with its own set of access policies. Each storage class can have its own path, VIP pool, and a set of mount options defined in the YAML configuration file.
A storage path is a path within VAST Cluster where VAST CSI Driver will create volume directories. The storage path is specified in the root_export
parameter in the YAML configuration file; for example: /a/b/c
. (Note that '/' cannot be used as a storage path.) The storage path must be mountable by VAST CSI Driver. This means that there must be at least one VAST Cluster view defined along the path; for example, at /a
, /a/b
, or a/b/c
).
To add a storage class:
-
Create a YAML configuration file that defines a new storage class and specify the following parameters (see the example below for correct indentation and line breaks when specifying the keywords):
The following example shows creating a storage class named
vastdata-filesystem-2
that uses path/k8s-2
and VIP pooltest1
. In the example, no custom mount options are set (mountOptions
is an empty string). Thevolume_name_fmt
parameter specifies the format string that controls the VAST Cluster quota name.kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: name: vastdata-filesystem-2 namespace: vast-csi provisioner: csi.vastdata.com parameters: vip_pool_name: 'test1' root_export: '/k8s-2' volume_name_fmt: csi:{namespace}:{name}:{id} mountOptions: - '' allowVolumeExpansion: true
-
Deploy the YAML configuration file:
kubectl apply -f <filename>.yaml
-
Verify that the storage class has been added:
kubectl get storageclasses
The output is similar to the following:
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE standard (default) k8s.io/minikube-hostpath Delete Immediate false 4d1h vastdata-filesystem (default) csi.vastdata.com Delete Immediate true 58m vastdata-filesystem-2 (default) csi.vastdata.com Delete Immediate true 56m vastdata-filesystem-3 (default) csi.vastdata.com Delete Immediate true 54m
Comments
0 comments
Article is closed for comments.