Storage & Persistent Volumes Flashcards
7 cards from real KCNA practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Storage & Persistent Volumes flashcards as text
Which PersistentVolume reclaim policy automatically deletes the volume and its data when the PVC is deleted?
Answer: Delete
The Delete reclaim policy causes Kubernetes to delete both the PV object and the underlying storage asset when the bound PVC is deleted.
What does the ReadWriteOncePod (RWOP) access mode enforce that ReadWriteOnce does not?
Answer: Volume can only be mounted by a single Pod across the entire cluster
RWOP restricts the volume to a single Pod cluster-wide, whereas RWO only restricts to a single node (multiple Pods on the same node could still mount it).
A StatefulSet is deployed with 3 replicas and a volumeClaimTemplate. How many PVCs will be created?
Answer: 3 PVCs, one per replica
StatefulSets create one PVC per replica from the volumeClaimTemplate, giving each Pod its own dedicated persistent storage.
Which field in a Pod spec allows you to specify the name of a PVC to mount as a volume?
Answer: spec.volumes[].persistentVolumeClaim.claimName
The spec.volumes[].persistentVolumeClaim.claimName field references a PVC by name, making it available as a volume in the Pod.
What status will a PVC show if no PersistentVolume matches its requirements and no dynamic provisioner is configured?
Answer: Pending
A PVC that cannot be bound to a matching PV stays in Pending status until a suitable volume becomes available.
Which Kubernetes feature allows you to create a PVC from an existing VolumeSnapshot to restore data?
Answer: VolumeSnapshot restore via dataSource referencing a VolumeSnapshot
Setting the PVC's spec.dataSource to reference a VolumeSnapshot triggers the CSI driver to restore the snapshot into the new volume.
Why would you choose a hostPath volume in a Kubernetes Pod?
Answer: To access a specific file or directory on the node's filesystem
hostPath mounts a file or directory from the host node's filesystem into the Pod, useful for node-level access but non-portable across nodes.