Enable CSI Snapshot Support on a Cluster
Enable CSI Snapshot Support for Programmatic Creation of Longhorn Snapshots/Backups
It is the responsibility of the Kubernetes distribution to deploy the snapshot controller as well as the related custom resource definitions.
For more information, see CSI Volume Snapshots.
You may manually install these components by executing the following steps.
Please install the same release version of snapshot CRDs and snapshot controller to ensure that the CRD version is compatible with the snapshot controller.
For general use, update the snapshot controller YAMLs with an appropriate namespace prior to installing.
For example, on a vanilla Kubernetes cluster, update the namespace from
kube-systemprior to issuing the
Install the Snapshot CRDs:
kubectl create -f client/config/crd.
Install the Common Snapshot Controller:
kubectl create -f deploy/kubernetes/snapshot-controller.
Note: previously, the snapshot controller YAML files were deployed into the
defaultnamespace by default. The updated YAML files are being deployed into
kube-systemnamespace by default. Therefore, we suggest deleting the previous snapshot controller in the
defaultnamespace to avoid having multiple snapshot controllers.
See the Usage section from the kubernetes external-snapshotter git repo for additional information.
Ensure the availability of the Snapshot CRDs. Afterwards create a default
# Use v1 as an example kind: VolumeSnapshotClass apiVersion: snapshot.storage.k8s.io/v1 metadata: name: longhorn driver: driver.longhorn.io deletionPolicy: Delete
© 2019-2023 Longhorn Authors | Documentation Distributed under CC-BY-4.0
© 2023 The Linux Foundation. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.