Volume Snapshot and Clones Provisioning Examples
This example is more complex and is composed of six different stages:
Stage 1: Create VolumeSnapshotClass.
Stage 2: Create Example PVC and POD.
Stage 3: Take a Snapshot from the PVC created in Stage #2.
Stage 4: Create a PVC from the Snapshot created in Stage #3 and create a POD that uses it.
Stage 5: Create a PVC from the PVC created in Stage #4 and create a POD that uses it.
Stage 6: Uninstall Snapshot Workloads.
The examples are dependent on one another, so you must run them in order.
Stage 1: Create VolumeSnapshotClass
Create a VolumeSnapshotClass:
Stage 2: Create Example PVC and POD
Running the following command:
Verify that PV, PVC are created and in Bounded state and POD is in Running state.
Stage 3: Take a Snapshot from the PVC created in Stage #2
Create a snapshot from the previously created PVC named example-pvc.
Verify that VolumeSnapshot and VolumeSnapshotContent were created, and that READYTOUSE status is true.
Stage 4: Create a PVC from the Snapshot created in stage #3, and create a POD that uses it
After your VolumeSnapshot object is bound, you can use that object to provision a new volume that is pre-populated with data from the snapshot.
The volume snapshot content object is used to restore the existing volume to a previous state.
Create a PVC from the previously taken Snapshot named example-snapshot:
Verify that PV, PVC were created and in Bounded state, and that POD is in Running state.
We see the PV, PVC and PODs from Stage #2 as well.
Stage 5: Create a PVC from the PVC we created in stage #4, and create a POD that uses it
Create a PVC from the previously taken Snapshot named example-snapshot.
Verify that PV, PVC were created and in Bounded state, and that POD is in Running state.
We see the PV, PVC and PODs from Stages #2 and #4 as well.
Stage 6: Uninstall Snapshot Workloads
Note: Installation must be in reverse order of the deployment.
After each uninstall, we need to verify that all related resources were released before continuing to the next uninstall.
Uninstall pvc-from-pvc:
In order to verify that all resources are deleted, the following command should not generate any output:
Uninstall pvc-from-snapshot:
In order to verify that all resources are deleted, the following command should not generate any output:
Uninstall snapshot-from-pvc:
In order to verify that all resources are deleted, the following command should not generate any output:
Uninstall example-pvc:
Verify that all resources are gone:
Delete VolumeSnapshotClass:
© 2026 Lightbits Labs™