vSphere Container Storage Plug-in supports dynamic volume provisioning for block volumes. When you use the dynamic volume provisioning, you can create storage volumes on demand in native Kubernetes clusters.
When you provision volumes dynamically, consider the following items:
- Block volumes can be provisioned using
ReadWriteOnce
access mode in thePersistentVolumeClaim
specification. Volumes created usingPersistentVolumeClaim
withReadWriteOnce
access mode should be used by a single pod. vSphere Container Storage Plug-in does not support creating multiple pods using thePersistentVolumeClaim
withReadWriteOnce
access mode. - Dynamic volume provisioning allows you to create storage volumes on demand.
- Without dynamic volume provisioning, cluster administrators have to manually make calls to their cloud or storage provider to create new storage volumes, and then create PersistentVolume objects to represent them in Kubernetes.
- With dynamic volume provisioning, cluster administrators do not need to pre-provision backing storage. Instead, the dynamic provisioning automatically provisions storage when it is requested by users.
- The implementation of dynamic volume provisioning is based on the API object
StorageClass
from the API groupstorage.k8s.io
. - A cluster administrator can define as many
StorageClass
objects as required. EachStorageClass
can specify a volume plug-inprovisioner
that provisions a volume, and a set of parameters. - A cluster administrator can define and expose multiple types of storage within a cluster by using custom set of parameters. Types of storage can be from the same or different storage systems.
WaitForFirstConsumer
volumeBinding mode with dynamic volume provisioning, see
Topology-Aware Volume Provisioning.
Note: Support for volume topology is present only in Vanilla Kubernetes for single-access (RWO) file system based volume.
You can provision a PersistentVolume dynamically on a native Kubernetes cluster by using the following steps.