topolvm / topolvm

Capacity-aware CSI plugin for Kubernetes
Apache License 2.0
809 stars 159 forks source link

Sometimes VolumeSnapshot CRD not exist #979

Open wushuyi opened 2 weeks ago

wushuyi commented 2 weeks ago

What

when i use k3s VolumeSnapshot CRD not exist

How

It is recommended to add documents

`

Change to the latest supported snapshotter version

$ SNAPSHOTTER_VERSION=v8.1.0

Apply VolumeSnapshot CRDs

$ kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${SNAPSHOTTER_VERSION}/client/config/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml $ kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${SNAPSHOTTER_VERSION}/client/config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml $ kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${SNAPSHOTTER_VERSION}/client/config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml

Create snapshot controller

$ kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${SNAPSHOTTER_VERSION}/deploy/kubernetes/snapshot-controller/rbac-snapshot-controller.yaml $ kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${SNAPSHOTTER_VERSION}/deploy/kubernetes/snapshot-controller/setup-snapshot-controller.yaml`

peng225 commented 1 week ago

@wushuyi Hi. We already have a document to say that we need some setup to use the snapshot feature. https://github.com/topolvm/topolvm/blob/a863b08beb35ddfd03bf94e5f46499983805b3ba/docs/snapshot-and-restore.md#prerequisites