CertKeen

Certified Kubernetes Administrator (CKA) · Free practice question 12 of 12

Restoring a PVC from a VolumeSnapshot

Dalbeattie Labs has the CSI snapshot CRDs and snapshot controller installed, and its CSI driver supports snapshots. They took a VolumeSnapshot named orders-snap of a CSI volume. How do they create a new PVC with that data?

  1. A.Create a PVC whose dataSource is the VolumeSnapshot orders-snap
  2. B.Run kubectl rollout undo volumesnapshot/orders-snap in the namespace
  3. C.Edit orders-snap and set restore: true
  4. D.Create a PV whose claimRef names orders-snap
Show answer and explanation

Correct answer: A. Create a PVC whose dataSource is the VolumeSnapshot orders-snap

Why: A new PVC that sets dataSource to kind VolumeSnapshot, apiGroup snapshot.storage.k8s.io and name orders-snap asks the CSI driver to provision a volume pre-filled from the snapshot. VolumeSnapshot support relies on the snapshot CRDs and the snapshot controller, which are add-ons installed separately from core Kubernetes. The snapshot is a read-only source and has no restore field, claimRef ties a PV to a PVC rather than a snapshot, and rollout commands apply to workloads.

More free Certified Kubernetes Administrator (CKA) questions