CKA Domain 4: Storage
20 free practice questions for Storage in the Certified Kubernetes Administrator (CKA) exam. Try each question first, then open "Show answer" for the correct option and explanation.
Storage practice questions
-
Question 1. What is the relationship between a PersistentVolume (PV) and a PersistentVolumeClaim (PVC)?
Show answer
Answer: D. A PVC requests storage and binds to a matching PV
PVs are cluster resources and PVCs are namespaced requests. Pods use PVCs.
-
Question 2. What enables dynamic provisioning of PVs when a PVC is created?
Show answer
Answer: C. A StorageClass with a provisioner
The StorageClass tells the provisioner, often a CSI driver, how to create volumes.
-
Question 3. Which access mode allows a volume to be mounted read-write by a single node?
Show answer
Answer: D. ReadWriteOnce
RWO allows one node. ReadWriteOncePod restricts access to a single Pod.
-
Question 4. Several Pods on different nodes must write to the same volume. Which access mode is required?
Show answer
Answer: A. ReadWriteMany
RWX needs a backend that supports shared access, such as NFS or a file storage CSI driver.
-
Question 5. Which reclaim policy deletes the underlying storage when its PVC is deleted?
Show answer
Answer: A. Delete
Delete removes the PV and backing storage. Retain keeps the data for manual recovery.
-
Question 6. A PV has reclaimPolicy: Retain and its PVC is deleted. What state does the PV enter?
Show answer
Answer: D. Released
A Released PV still holds data and must be cleaned up manually before it can be reused.
-
Question 7. A PVC stays Pending. What is a common cause?
Show answer
Answer: D. No PV or StorageClass can satisfy its size, access mode, or class
Check kubectl describe pvc for events. With WaitForFirstConsumer, it waits until a Pod uses it.
-
Question 8. What does volumeBindingMode: WaitForFirstConsumer do?
Show answer
Answer: D. Delays provisioning until a Pod using the PVC is scheduled
This ensures the volume is created in the same zone as the node running the Pod.
-
Question 9. Which StorageClass setting lets PVCs be resized after creation?
Show answer
Answer: C. allowVolumeExpansion: true
With expansion allowed, edit the PVC's requested size to grow the volume.
-
Question 10. How does a PVC request a specific StorageClass?
Show answer
Answer: C. spec.storageClassName
If omitted, the default StorageClass is used when one exists.
-
Question 11. Which volume type shares a temporary directory between containers in a Pod and is deleted with the Pod?
Show answer
Answer: C. emptyDir
emptyDir lives as long as the Pod. It can be backed by memory with medium: Memory.
-
Question 12. Why should hostPath volumes be avoided for most applications?
Show answer
Answer: C. They tie Pods to a node's filesystem and can expose the host
hostPath is useful for system Pods but risky for regular workloads.
-
Question 13. How is a PVC referenced in a Pod spec?
Show answer
Answer: C. In volumes, via persistentVolumeClaim.claimName
The volume references the claim, and each container mounts it at a path.
-
Question 14. In a StatefulSet, what creates a separate PVC for each replica?
Show answer
Answer: D. volumeClaimTemplates
Each Pod gets its own claim, such as data-db-0 and data-db-1, which persists across rescheduling.
-
Question 15. Which command shows PVs and their status, capacity, and reclaim policy?
Show answer
Answer: A. kubectl get pv
PVs are cluster-scoped, so no namespace is needed.
-
Question 16. What must match between a static PV and a PVC for them to bind?
Show answer
Answer: D. Storage class, access modes, and enough capacity
A selector or volumeName can also target a specific PV.
-
Question 17. How is a default StorageClass marked?
Show answer
Answer: A. With the is-default-class annotation set to "true"
PVCs without a storageClassName use the default class.
-
Question 18. Which CSI feature can capture a point-in-time copy of a PVC?
Show answer
Answer: A. VolumeSnapshot
VolumeSnapshots need a CSI driver that supports snapshots and a VolumeSnapshotClass.
-
Question 19. Which volume type projects a ConfigMap's data as files into a container?
Show answer
Answer: C. configMap volume
Each key becomes a file. Use items to select specific keys and paths.
-
Question 20. A PVC is in use by a running Pod and you delete the PVC. What happens?
Show answer
Answer: C. Deletion waits until no Pod uses it, due to storage object in-use protection
The finalizer keeps the PVC until the Pod stops using it.
CKA, Certified Kubernetes Administrator, and Kubernetes are trademarks of The Linux Foundation. These questions are original study material, not questions from the real exam.