As a DevOps engineer, you can use the Kubernetes volume expansion feature to expand a persistent block volume after its creation. Both types of clusters, Supervisor Clusters and Tanzu Kubernetes clusters, support offline and online volume expansion.

Storage classes that appear in the vSphere with Tanzu 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.

If you use a Tanzu Kubernetes cluster, make sure to upgrade both the Tanzu Kubernetes cluster and the Supervisor Cluster to the appropriate version for the functionality to be supported. The functionality in the Tanzu Kubernetes cluster depends on the enablement of that feature in the Supervisor Cluster.

For example, if you upgrade the Tanzu Kubernetes cluster to vSphere 7.0 Update 2 and leave the Supervisor Cluster at 7.0 Update 1, the online volume expansion will not work in the Tanzu Kubernetes cluster.

Supervisor Cluster 7.0 Supervisor Cluster 7.0 Update 1 Supervisor Cluster 7.0 Update 2
Tanzu Kubernetes Cluster 7.0 Offline and online expansions in a Tanzu Kubernetes cluster or Supervisor Cluster: not supported Offline and online expansions in a Tanzu Kubernetes cluster or Supervisor Cluster: not supported
  • Offline and online expansions in a Tanzu Kubernetes cluster: not supported
  • Offline and online expansions in a Supervisor Cluster: supported
Tanzu Kubernetes Cluster 7.0 Update 1 Offline and online expansions in a Tanzu Kubernetes cluster or Supervisor Cluster: not supported
  • Offline expansion in a Tanzu Kubernetes cluster: supported
  • Offline expansion in a Supervisor Cluster: not supported
  • Online expansion in a Tanzu Kubernetes cluster or Supervisor Cluster: not supported
  • Offline expansion in a Tanzu Kubernetes cluster: supported
  • Online expansion in a Tanzu Kubernetes cluster: not supported
  • Offline and online expansions in a Supervisor Cluster: supported
Tanzu KubernetesCluster 7.0 Update 2 Offline and online expansions in a Tanzu Kubernetes cluster or Supervisor Cluster: not supported
  • Offline expansion in a Tanzu Kubernetes cluster: supported
  • Offline expansion in a Supervisor Cluster: not supported
  • Online expansion in a Tanzu Kubernetes cluster or Supervisor Cluster: not supported
Offline and online expansions in a Tanzu Kubernetes cluster or Supervisor Cluster: supported
When you expand the volumes, keep in mind the following:
  • You can expand the volumes up to the limits specified by storage quotas. vSphere with Tanzu 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 Cluster and Tanzu Kubernetes cluster if the volumes have storage classes associated with them.
  • You cannot expand volumes created as part of a StatefulSet.
  • If a virtual disk that backs a volume has snapshots, it cannot be resized.
  • vSphere with Tanzu does not support volume expansion for in-tree or migrated volumes.