Snapshot a volume, destroy the source, restore from it¶
Artifact — a PVC restored from a VolumeSnapshot after its source PVC was deleted, with the data intact.
Topology — pair, continued from expansion.
Footprint note — this installs the external-snapshotter CRDs plus a snapshot controller, which is a controller Deployment the phase's original costing did not include. It is small, but take a memory request from kubectl top for it the way you would for your own work.
Do
- Install the
external-snapshotterCRDs and controller. Notice what you just installed: CRDs plus a controller watching them, which is the shape you built in P4. - Write identifiable data into a bound PVC from a pod.
- Take a
VolumeSnapshotagainst aVolumeSnapshotClass. Watch theVolumeSnapshotContentobject appear beside it. - Delete the source PVC.
- Create a new PVC with
dataSourcenaming the snapshot, mount it, and check the data.
Observe
kubectl get volumesnapshot,volumesnapshotcontent -o wide
kubectl get volumesnapshotclass
kubectl describe volumesnapshot <name> | sed -n '/Status/,$p'
Expect — the same two-object split as PV/PVC, one namespaced and one cluster-scoped, with a class in front of both. Snapshots are not in-tree: they are CRDs and an out-of-tree controller, and that is the point of doing them right after reading KEP-177.
Write down — the object triple (VolumeSnapshot / VolumeSnapshotContent / VolumeSnapshotClass) mapped onto the PVC/PV/StorageClass triple, and where the analogy breaks.
Teardown — leave it up for the finalizer deadlock.