You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/persistent-storage-csi-snapshots-delete.adoc
+43-5Lines changed: 43 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,10 +9,7 @@ You can configure how {product-title} deletes volume snapshots.
9
9
10
10
.Procedure
11
11
12
-
To enable deletion of a volume snapshot in a cluster:
13
-
14
12
. Specify the deletion policy that you require in the `VolumeSnapshotClass` object, as shown in the following example:
15
-
16
13
+
17
14
.volumesnapshotclass.yaml
18
15
[source,yaml]
@@ -24,6 +21,47 @@ metadata:
24
21
driver: hostpath.csi.k8s.io
25
22
deletionPolicy: Delete <1>
26
23
----
27
-
<1> If the `Delete` value is set, the underlying snapshot will be deleted, along with the `VolumeSnapshotContent` object. If the `Retain` value is set, both the underlying snapshot and `VolumeSnapshotContent` object remain.
24
+
<1> When deleting the volume snapshot, if the `Delete` value is set, the underlying snapshot is deleted along with the `VolumeSnapshotContent` object. If the `Retain` value is set, both the underlying snapshot and `VolumeSnapshotContent` object remain.
28
25
+
29
-
If the `Retain` value is set, and the `VolumeSnapshot` object is deleted without deleting the corresponding `VolumeSnapshotContent` object, then the content will remain. The snapshot itself is also retained in the storage back end.
26
+
If the `Retain` value is set and the `VolumeSnapshot` object is deleted without deleting the corresponding `VolumeSnapshotContent` object, the content remains. The snapshot itself is also retained in the storage back end.
27
+
28
+
. Delete the volume snapshot by entering the following command:
. Optional: If the `VolumeSnapshot` object is not successfully deleted, enter the following command to remove any finalizers for the leftover resource so that the delete operation can continue:
49
+
+
50
+
[IMPORTANT]
51
+
====
52
+
Only remove the finalizers if you are confident that there are no existing references from either persistent volume claims or volume snapshot contents to the `VolumeSnapshot` object.
53
+
Even with the `--force` option, the delete operation does not delete snapshot objects until all finalizers are removed.
0 commit comments