Volume snapshots
By default, this is disabled.
Sync VolumeSnapshot and VolumeSnapshotContent resources from the cluster to the control plane cluster. These two resources work together. A VolumeSnapshot is the tenant-facing request for a snapshot of a PersistentVolumeClaim. A VolumeSnapshotContent is the underlying snapshot resource that a CSI driver provisions in response.
Prerequisites​
- A CSI driver with snapshot support, its CSI snapshotter sidecar, and the common snapshot controller installed in the control plane cluster. See the external-snapshotter project for these components.
- The VolumeSnapshot, VolumeSnapshotContent, and VolumeSnapshotClass CRDs installed in the control plane cluster. When enabled, vCluster tries to detect these CRDs on the control plane cluster and fails to start up if they're missing.
- A VolumeSnapshotClass available in the control plane cluster for the CSI driver you're using. Sync it into the cluster with
sync.fromHost.volumeSnapshotClasses, since a VolumeSnapshot normally references a VolumeSnapshotClass by name to resolve which driver takes the snapshot.
Enable syncing VolumeSnapshots and VolumeSnapshotContents to the control plane cluster​
sync:
fromHost:
# Make the control plane cluster's snapshot classes available to users.
volumeSnapshotClasses:
enabled: true
toHost:
volumeSnapshots:
enabled: true
volumeSnapshotContents:
enabled: true
You must enable volumeSnapshots and volumeSnapshotContents together. vCluster rejects a configuration that enables only one of these resources because each VolumeSnapshot depends on a corresponding VolumeSnapshotContent.
RBAC​
Enabling volume snapshot syncing requires additional RBAC permissions for the vCluster ServiceAccount to manage VolumeSnapshot and VolumeSnapshotContent resources in the control plane cluster. rbac.enableVolumeSnapshotRules defaults to auto and adds these permissions automatically when volume snapshot syncing is enabled.
Patches​
Use sync.toHost.volumeSnapshots.patches and sync.toHost.volumeSnapshotContents.patches to transform these resources' fields while syncing to the control plane cluster. See Patching synced resources for syntax, directionality, and examples.
Config reference​
For every field under sync.toHost.volumeSnapshots and sync.toHost.volumeSnapshotContents, see the volumeSnapshots and volumeSnapshotContents entries in the sync reference.