Certified Kubernetes Administrator (CKA) — All Questions
3 questions
A Pod needs durable storage that survives Pod restarts and rescheduling. Which pair of objects does a Pod use to consume such storage?
- a.A ConfigMap referenced by a Secret
- b.A PersistentVolumeClaim that binds to a PersistentVolume✓
- c.An emptyDir volume mounted from the node
- d.A hostPath referenced by a DaemonSet
A Pod requests durable storage through a PersistentVolumeClaim (PVC), which binds to a PersistentVolume (PV) that represents the actual storage. emptyDir is ephemeral and tied to the Pod's lifetime, and hostPath ties data to a specific node. The PVC/PV abstraction decouples Pods from storage details.
What does a StorageClass primarily enable in a Kubernetes cluster?
- a.Encryption of etcd at rest
- b.Automatic garbage collection of unused images
- c.Dynamic provisioning of PersistentVolumes on demand✓
- d.Scheduling Pods based on disk speed labels
A StorageClass defines a provisioner and parameters that allow PersistentVolumes to be created automatically when a PersistentVolumeClaim requests that class, rather than an admin pre-creating each PV. This dynamic provisioning is the standard way to supply storage in most clusters.
A PersistentVolume has a reclaim policy of Retain. What happens to the underlying storage when its bound PersistentVolumeClaim is deleted?
- a.The PV and its data are kept and must be reclaimed manually by an administrator✓
- b.The PV and its data are immediately deleted
- c.The PV is automatically rebound to the next PVC that appears
- d.The Pod using it is prevented from terminating
With the Retain reclaim policy, deleting the PVC leaves the PV and its data intact in a Released state; an administrator must manually clean up or reuse it. Delete would remove the underlying storage, and Recycle (deprecated) scrubbed and reused it. Retain protects important data from accidental loss.