CKAD Storage and Persistence 1 — Questions and Answers
Question 1: What is a PersistentVolume (PV) in Kubernetes?
- A cluster-level resource that abstracts physical storage provisioned by an admin or dynamically by a StorageClass (Correct answer)
- A volume defined inside a Pod spec that persists beyond pod restarts
- A namespace-scoped resource that requests storage from the cluster
- A Kubernetes object that automatically backs up pod data
Correct answer: A cluster-level resource that abstracts physical storage provisioned by an admin or dynamically by a StorageClass
A PersistentVolume is a cluster-level resource representing a piece of storage provisioned by an admin or dynamically via StorageClass, independent of any individual pod.
Question 2: Which access mode allows a PersistentVolume to be mounted read-write by multiple nodes simultaneously?
- ReadWriteOnce (RWO)
- ReadOnlyMany (ROX)
- ReadWriteMany (RWX) (Correct answer)
- ReadWriteOncePod (RWOP)
Correct answer: ReadWriteMany (RWX)
ReadWriteMany (RWX) allows the volume to be mounted as read-write by multiple nodes at the same time.
Question 3: What happens to a PersistentVolume when its bound PVC is deleted and the reclaim policy is 'Retain'?
- The PV is automatically deleted along with its data
- The PV is made available for new PVCs immediately
- The PV transitions to 'Released' status and retains its data until manually reclaimed (Correct answer)
- The PV is automatically rebound to another pending PVC
Correct answer: The PV transitions to 'Released' status and retains its data until manually reclaimed
With the Retain reclaim policy, the PV transitions to 'Released' state and preserves all data until an administrator manually intervenes.
Question 4: Which field in a PVC spec specifies which StorageClass should be used for provisioning?
- provisioner
- storageClassName (Correct answer)
- volumeName
- accessModes
Correct answer: storageClassName
The storageClassName field in a PVC spec designates which StorageClass to use for dynamic provisioning or static binding.
Question 5: What is the default reclaim policy for dynamically provisioned PersistentVolumes?
- Retain
- Recycle
- Delete (Correct answer)
- Archive
Correct answer: Delete
Dynamically provisioned PVs default to the Delete reclaim policy, removing both the PV object and the underlying storage asset when the PVC is deleted.
Question 6: Which volume type mounts a file or directory from the host node's filesystem directly into a Pod?
- emptyDir
- configMap
- hostPath (Correct answer)
- nfs
Correct answer: hostPath
The hostPath volume type mounts a file or directory from the host node's local filesystem into a Pod.
Question 7: Which kubectl command lists all PersistentVolumeClaims along with their status and capacity?
- kubectl describe pv
- kubectl get pvc (Correct answer)
- kubectl list pvc
- kubectl status pvc
Correct answer: kubectl get pvc
kubectl get pvc lists all PersistentVolumeClaims in the current namespace with their status, capacity, and access modes.
What is a PersistentVolume (PV) in Kubernetes?