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?
- A.Create a PVC whose dataSource is the VolumeSnapshot orders-snap
- B.Run kubectl rollout undo volumesnapshot/orders-snap in the namespace
- C.Edit orders-snap and set restore: true
- 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
- Drain flags for DaemonSets and emptyDir
- CronJob concurrencyPolicy Forbid
- Listing cluster-scoped API resources
- Setting the default namespace in a context
- Session affinity by client IP
- Pod dnsPolicy Default versus ClusterFirst
- Raw block volumes with volumeMode
- Debugging a node with kubectl debug
- CreateContainerConfigError from missing ConfigMap
- Approving a client CertificateSigningRequest
- NetworkPolicy ipBlock with except