As a DevOps engineer, you can expand a persistent block volume after its creation. In vSphere IaaS control plane, both types of clusters, Supervisors and TKG, support offline and online volume expansion.
Storage classes that appear in the vSphere IaaS control plane environment have allowVolumeExpansion
set to true
by default. This parameter makes it possible to modify the size of an offline or online volume.
A volume is considered to be offline when it is not attached to a node or pod. An online volume is a volume that is available on a node or pod.
The level of support of the volume expansion functionality depends on the vSphere version. You can expand volumes created in the earlier versions of vSphere when you upgrade your vSphere environment to appropriate versions that support expansions.
- You can expand the volumes up to the limits specified by storage quotas. vSphere IaaS control plane supports consecutive resize requests for a persistent volume claim object.
- All types of datastores, including VMFS, vSAN, vSAN Direct, vVols, and NFS, support volume expansion.
- You can perform volume expansion for deployments or standalone pods.
- You can resize statically provisioned volumes in a Supervisor and TKG cluster if the volumes have storage classes associated with them.
- You cannot expand volumes that are created as a part of a StatefulSet when you use the StatefulSet definition. Currently, Kubernetes does not support this functionality. As a result, your attempts to expand the volumes by increasing the storage size in the StatefulSet definition fail.
- If a virtual disk that backs a volume has snapshots, it cannot be resized.
- vSphere IaaS control plane does not support volume expansion for in-tree or migrated volumes.
Expand a Persistent Volume in Offline Mode
A volume is considered to be offline when it is not attached to a node or pod. Both types of clusters, Supervisors and TKG clusters, support offline volume expansion.
Prerequisites
Make sure to upgrade your vSphere environment to an appropriate version that supports offline volume expansion.
Procedure
What to do next
Expand a Persistent Volume in Online Mode
An online volume is a volume that is available on a node or pod. As a DevOps engineer, you can expand an online persistent block volume. Both types of clusters, Supervisors and TKG clusters, support online volume expansion.
Prerequisites
Make sure to upgrade your vSphere environment to an appropriate version that supports online volume expansion.