Skip to content

Commit b938453

Browse files
committed
cleanup
1 parent 71e2f75 commit b938453

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ disk offerings to Kubernetes storage classes.
8989

9090
> **Note:** The VolumeSnapshot CRDs (CustomResourceDefinitions) of version 8.3.0 are installed in this deployment. If you use a different version, please ensure compatibility with your Kubernetes cluster and CSI sidecars.
9191
92-
// TODO: Should we have the crds locally or manually install it from:
9392

9493
```
9594
kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/v8.3.0/client/config/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml
@@ -126,11 +125,12 @@ make container
126125

127126
**NOTE:** To create volume snapshots in KVM, make sure to set the `kvm.snapshot.enabled` global setting to true and restart the Management Server
128127

128+
### Volume snapshot creation
129129
For Volume snapshots to be created, the following configurations need to be applied:
130130

131131
```
132-
kubectl aplly -f 00-snapshot-crds.yaml # Installs the VolumeSnapshotClass, VolumeSnapshotContent and VolumeSnapshtot CRDs
133-
volume-snapshot-class.yaml # Defines VolumeSnapshotClass for CloudStack CSI driver
132+
kubectl apply -f deploy/k8s/00-snapshot-crds.yaml # Installs the VolumeSnapshotClass, VolumeSnapshotContent and VolumeSnapshtot CRDs
133+
kubectl apply -f deploy/k8s/volume-snapshot-class.yaml # Defines VolumeSnapshotClass for CloudStack CSI driver
134134
```
135135

136136
Once the CRDs are installed, the snapshot can be taken by applying:
@@ -148,6 +148,8 @@ kubectl logs -f <cloudstack-csi-controller pod_name> -n kube-system -c csi-snaps
148148
kubectl logs -f <cloudstack-csi-controller pod_name> -n kube-system -c snapshot-controller
149149
```
150150

151+
### Restoring a Volume snapshot
152+
151153
To restore a volume snapshot:
152154
1. Restore a snapshot and Use it in a pod
153155
* Create a PVC from the snapshot - for example ./examples/k8s/snapshot/pvc-from-snapshot.yaml
@@ -171,13 +173,16 @@ spec:
171173
```
172174

173175

176+
### Deletion of a volume snapshot
177+
174178
To delete a volume snapshot
175179
One can simlpy delete the volume snapshot created in kubernetes using
176180

177181
```
178182
kubectl delete volumesnapshot snapshot-1 # here, snapshot-1 is the name of the snapshot created
179183
```
180184

185+
#### Troubleshooting issues with volume snapshot deletion
181186
If for whatever reason, snapshot deletion gets stuck, one can troubleshoot the issue doing the following:
182187

183188
* Inspect the snapshot
@@ -201,7 +206,7 @@ If finalizers are present, Kubernetes will not delete the resource until they ar
201206
kubectl patch volumesnapshot <snapshot-name> [-n <namespace>] --type=merge -p '{"metadata":{"finalizers":[]}}'
202207
```
203208

204-
**NOTE:** This bypasses cleanup logic. Use only if you're certain the snapshot is no longer needed at the CSI/backend level
209+
**Caution:** This bypasses cleanup logic. Use only if you're certain the snapshot is no longer needed at the CSI/backend level
205210

206211
### What happens when you restore a volume from a snapshot
207212
* The CSI external-provisioner (a container in the cloudstack-csi-controller pod) sees the new PVC and notices it references a snapshot

0 commit comments

Comments
 (0)