Enable CSI Volume Group Snapshot Support on a Cluster
Taking a CSI VolumeGroupSnapshot requires three things on top of regular CSI snapshot support:
CSIVolumeGroupSnapshot feature gate enabled on the snapshot-controller.Prerequisite: CSI snapshot support must be enabled on your cluster. See Enable CSI Snapshot Support.
Warning: Potential Snapshot Outage Install the VolumeGroupSnapshot CRDs before enabling the
CSIVolumeGroupSnapshotfeature gate on any component. If the feature gate is enabled while the CRDs are missing, the csi-snapshotter sidecar stops serving regular volume snapshots. EveryVolumeSnapshotin the cluster will hang in thePendingstate even though the sidecar pod reportsRunning.
The CRDs ship with external-snapshotter: VolumeGroupSnapshotClass, VolumeGroupSnapshot, and VolumeGroupSnapshotContent in the groupsnapshot.storage.k8s.io API group.
Use release v8.6.0 or later so they serve the v1 API. Replace <version> in the URLs below with your target release (e.g., v8.6.0) and apply:
kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/<version>/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotclasses.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/<version>/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshots.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/<version>/client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotcontents.yaml
The snapshot-controller processes VolumeGroupSnapshot objects only when its CSIVolumeGroupSnapshot feature gate is on. The controller must also be from external-snapshotter v8.6.0 or later.
Add the feature gate to the controller arguments, adjusting the namespace to where your snapshot-controller is deployed (default is kube-system):
kubectl -n kube-system patch deploy snapshot-controller --type=json \
-p='[{"op":"add","path":"/spec/template/spec/containers/0/args/-","value":"--feature-gates=CSIVolumeGroupSnapshot=true"}]'
In Longhorn, VolumeGroupSnapshot support is off by default. Enabling it turns on the CSIVolumeGroupSnapshot feature gate of the csi-snapshotter that Longhorn deploys.
For Helm installations: Set the chart value csi.volumeGroupSnapshotEnabled to true.
For kubectl installations: Uncomment the CSI_VOLUME_GROUP_SNAPSHOT_ENABLED environment variable in the longhorn-driver-deployer Deployment of the deploy manifest:
- name: CSI_VOLUME_GROUP_SNAPSHOT_ENABLED
value: "true"
Troubleshooting:: When the Longhorn toggle is enabled but the VolumeGroupSnapshot CRDs are missing (or not served at
v1), the Longhorn driver deployer will fail with an error naming the missing CRDs. However, regular per-volume snapshots will keep working. To recover, simply install the CRDs (or disable the toggle) and redeploy.
Copyright © 2019-2026 Longhorn a Series of LF Projects, LLC. Documentation Distributed under CC-BY-4.0.
The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.
For website terms of use, trademark policy and other project policies please see lfprojects.org/policies.