Enable CSI Snapshot Support for Programmatic Creation of Longhorn Snapshots/Backups

    If your Kubernetes Distribution Does Not Bundle the Snapshot Controller

    Note that the snapshot controller YAML files mentioned below deploy into the default namespace.

    Prerequisite

    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.

    Install the Snapshot CRDs:

    1. Download the files from
    2. Do this once per cluster.

    Install the Common Snapshot Controller:

    1. Download the files from https://github.com/kubernetes-csi/external-snapshotter/tree/release-4.0/deploy/kubernetes/snapshot-controller
    2. Run kubectl create -f deploy/kubernetes/snapshot-controller.
    3. Do this once per cluster.

    See the section from the kubernetes external-snapshotter git repo for additional information.

    Add a Default VolumeSnapshotClass

    Ensure the availability of the Snapshot CRDs. Afterwards create a default .