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, path protection, or replication policies. Each storage class can have its own path, VIP pool, a set of mount options, and other parameters.
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.
During initial deployment of VAST CSI Driver, you define one or more storage classes in the VAST CSI Driver chart configuration file. Later you can add more storage classes by creating and applying a Kubernetes YAML configuration file.
To add a storage class using a Kubernetes YAML configuration file:
-
Create a YAML configuration file that defines a new storage class and specify the following required parameters (see the example below for correct indentation and line breaks when specifying the keywords):
-
In
metadata
:-
name
specifies the name for the new storage class.
-
-
In
parameters
:-
vip_pool_name
is the name of the VAST VIP pool to be used when mounting the volume. -
root_export
is the path in the storage system where the volume directory is created. -
view_policy
is the view policy that will be assigned to VAST Cluster views that VAST CSI Driver creates for the volumes being provisioned. -
volume_name_fmt
sets the format for naming the volumes being created.The default volume is
csi:{namespace}:{name}:{id}
, where:-
namespace
is the Kubernetes namespace where volume parent workload is located. -
name
is the volume name. -
id
is the volume ID set by Kubernetes.
-
Note
For a complete list of options that can be specified for a storage class, see Storage Class Option Reference.
-
The following example shows creating a storage class named
vastdata-filesystem-2
that uses path/k8s-2
, view policydefault
, and VIP pooltest1
. In the example, no custom mount options are set (mountOptions
is an empty string).apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: vastdata-filesystem-2 provisioner: csi.vastdata.com parameters: vip_pool_name: 'test1' root_export: '/k8s-2' view_policy: 'default' 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
You can specify storage class options as follows:
-
In the Helm chart configuration file created for VAST CSI Driver during initial deployment, or
-
In a Kubernetes YAML configuration file deployed at a later stage.
Option in Helm chart configuration file |
Option in Kubernetes YAML configuration file |
Description |
---|---|---|
|
|
A format string that controls naming of Kubernetes ephemeral volumes created through VAST CSI Driver. |
|
|
Specify any custom NFS mount options. Examples: mountOptions: - "proto=rdma" - "port=20049" mountOptions: - debug - nosuid - soft mountOptions: - nfsvers=4 NoticeNFSv4.1 is supported starting with VAST CSI Driver 2.2.1. |
|
|
A Quality of Service (QoS) policy to be associated with automatically created views. In a QoS policy, you can set limits to define minimum and maximum allowed bandwidth and/or IOPS for read and/or write operations per view. For more information, see Configuring a QoS Policy and Quality of Service. NoticeThis option is available starting with VAST CSI Driver 2.2.5. |
|
|
The storage path within VAST Cluster to be used when dynamically provisioning Kubernetes volumes. VAST CSI Driver will automatically create a VAST Cluster view for each volume being provisioned. |
|
|
The name of the VAST Cluster view policy to be assigned to VAST Cluster views created by VAST CSI Driver. A view policy defines access settings for storage exposed through a VAST Cluster view. For more information, see Configuring View Policies and Managing Views and View Policies. All view policies used with VAST CSI Driver must have the same security flavor. If you are going to use VAST CSI Driver with VAST Cluster 4.6 or later, a view policy set for a storage class must belong to the same VAST Cluster tenant as the VIP pool(s) specified for that storage class. |
|
|
The name of the virtual IP pool to be used by VAST CSI Driver. For more information, see Setting up VIP Pools and Managing Virtual IP Pools. If you are going to use VAST CSI Driver with VAST Cluster 4.6 or later, a VIP pool that you specify for a storage class must belong to the same VAST Cluster tenant as the view policy specified for this storage class. |
|
|
A format string that controls naming of volumes created through VAST CSI Driver. The default format is |
Comments
0 comments
Article is closed for comments.