TKG Service clusters support volume snapshot and restore capabilities. As a DevOps user, you can protect workloads in TKG clusters by taking volume snapshots.

You can use a snapshot to provision a new volume, pre-populated with the snapshot data.

Prerequisites

To create CSI snapshots for TKG Service clusters, your environment must meet the following prerequisites.

Requirements

CSI snapshot functionality is delivered as a TKG package. The requirements for using CSI snapshot package are as follows:

Guidelines and Limitations

When you use the snapshot and restore functionality with TKG clusters, follow these guidelines.

  • Only block volumes support volume snapshot and restore operations. You cannot use these operations with vSphere file volume.
  • When you create a PVC from a VolumeSnapshot, it should reside on the same datastore as the original VolumeSnapshot. Otherwise, the provisioning of that PVC fails with the following error:
    failed to provision volume with StorageClass <storage-class-name>: rpc error: code = Internal desc = failed to create volume. Error: failed to get the compatible datastore for create volume from snapshot <snapshot-name> with error: failed to find datastore with URL <datastore-url> from the input datastore list, <[datastore-list]>

    The datastore for the target PVC that you create from the VolumeSnapshot is determined by the StorageClass in the PVC definition. Make sure that the StorageClass of the target PVC and the StorageClass of the original source PVC point to the same datastore, which is the datastore of the source PVC. This rule also applies to the topology requirements in the StorageClass definitions. The requirements must also point to the same common datastore. Any conflicting topology requirements result in the same error as shown above.

  • You cannot delete or expand a volume that contains associated snapshots. Delete all snapshots to expand or delete the source volume.
  • When you create a volume from a snapshot, ensure that the size of the volume matches the size of the snapshot.
  • Storage Quota monitoring is not supported for snapshots.
  • You cannot configure the maximum number of snapshots per volume in vSphere configuration. For a better performance, use two to three snapshots per virtual disk. For more information, see Best practices for using VMware snapshots in the vSphere environment.

    For vSAN ESA, use maximum 32 snapshots per volume. For more information about vSAN ESA, see vSAN Express Storage Architecture.