CKA · Domain 4 of 5 · 10% of the exam

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

  1. Question 1. What is the relationship between a PersistentVolume (PV) and a PersistentVolumeClaim (PVC)?

    1. A PV requests storage and binds to a matching PVC
    2. They are two different names for the same object
    3. A PVC is a cluster-scoped copy of a PV's settings
    4. A PVC requests storage and binds to a matching PV
    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.

  2. Question 2. What enables dynamic provisioning of PVs when a PVC is created?

    1. A hostPath volume
    2. A ConfigMap with disk sizes
    3. A StorageClass with a provisioner
    4. A ResourceQuota
    Show answer

    Answer: C. A StorageClass with a provisioner

    The StorageClass tells the provisioner, often a CSI driver, how to create volumes.

  3. Question 3. Which access mode allows a volume to be mounted read-write by a single node?

    1. ReadOnlyMany
    2. ReadWriteMany
    3. ReadWriteOncePod only
    4. ReadWriteOnce
    Show answer

    Answer: D. ReadWriteOnce

    RWO allows one node. ReadWriteOncePod restricts access to a single Pod.

  4. Question 4. Several Pods on different nodes must write to the same volume. Which access mode is required?

    1. ReadWriteMany
    2. ReadWriteOnce
    3. ReadOnlyMany
    4. ReadWriteOncePod
    Show answer

    Answer: A. ReadWriteMany

    RWX needs a backend that supports shared access, such as NFS or a file storage CSI driver.

  5. Question 5. Which reclaim policy deletes the underlying storage when its PVC is deleted?

    1. Delete
    2. Retain
    3. Recycle
    4. Archive
    Show answer

    Answer: A. Delete

    Delete removes the PV and backing storage. Retain keeps the data for manual recovery.

  6. Question 6. A PV has reclaimPolicy: Retain and its PVC is deleted. What state does the PV enter?

    1. Available
    2. Bound
    3. Failed
    4. Released
    Show answer

    Answer: D. Released

    A Released PV still holds data and must be cleaned up manually before it can be reused.

  7. Question 7. A PVC stays Pending. What is a common cause?

    1. The Pod using it is in a different namespace
    2. The Service is missing endpoints
    3. The node has too many CPU cores
    4. No PV or StorageClass can satisfy its size, access mode, or class
    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.

  8. Question 8. What does volumeBindingMode: WaitForFirstConsumer do?

    1. Binds the PVC immediately to any PV
    2. Waits for an admin to approve the claim
    3. Prevents the volume from being deleted
    4. Delays provisioning until a Pod using the PVC is scheduled
    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.

  9. Question 9. Which StorageClass setting lets PVCs be resized after creation?

    1. reclaimPolicy: Retain
    2. volumeBindingMode: Immediate
    3. allowVolumeExpansion: true
    4. mountOptions: resize
    Show answer

    Answer: C. allowVolumeExpansion: true

    With expansion allowed, edit the PVC's requested size to grow the volume.

  10. Question 10. How does a PVC request a specific StorageClass?

    1. metadata.labels.class
    2. spec.volumeName only
    3. spec.storageClassName
    4. spec.accessModes
    Show answer

    Answer: C. spec.storageClassName

    If omitted, the default StorageClass is used when one exists.

  11. Question 11. Which volume type shares a temporary directory between containers in a Pod and is deleted with the Pod?

    1. hostPath
    2. persistentVolumeClaim
    3. emptyDir
    4. nfs
    Show answer

    Answer: C. emptyDir

    emptyDir lives as long as the Pod. It can be backed by memory with medium: Memory.

  12. Question 12. Why should hostPath volumes be avoided for most applications?

    1. They are slower than any network storage
    2. They cannot be mounted read-only
    3. They tie Pods to a node's filesystem and can expose the host
    4. They are deleted when a container restarts
    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.

  13. Question 13. How is a PVC referenced in a Pod spec?

    1. In containers.image, after the image name
    2. In spec.nodeSelector, as a label
    3. In volumes, via persistentVolumeClaim.claimName
    4. In metadata.annotations, as a key
    Show answer

    Answer: C. In volumes, via persistentVolumeClaim.claimName

    The volume references the claim, and each container mounts it at a path.

  14. Question 14. In a StatefulSet, what creates a separate PVC for each replica?

    1. A shared PVC in the Pod template
    2. A DaemonSet with hostPath
    3. A StorageClass with replicas set
    4. volumeClaimTemplates
    Show answer

    Answer: D. volumeClaimTemplates

    Each Pod gets its own claim, such as data-db-0 and data-db-1, which persists across rescheduling.

  15. Question 15. Which command shows PVs and their status, capacity, and reclaim policy?

    1. kubectl get pv
    2. kubectl get pvc --all
    3. kubectl describe storageclass
    4. kubectl get volumes
    Show answer

    Answer: A. kubectl get pv

    PVs are cluster-scoped, so no namespace is needed.

  16. Question 16. What must match between a static PV and a PVC for them to bind?

    1. Their names must be identical
    2. They must be in the same namespace
    3. They must have the same labels on the node
    4. Storage class, access modes, and enough capacity
    Show answer

    Answer: D. Storage class, access modes, and enough capacity

    A selector or volumeName can also target a specific PV.

  17. Question 17. How is a default StorageClass marked?

    1. With the is-default-class annotation set to "true"
    2. By naming the StorageClass "default"
    3. By setting reclaimPolicy: Default on it
    4. By creating it in the kube-system namespace
    Show answer

    Answer: A. With the is-default-class annotation set to "true"

    PVCs without a storageClassName use the default class.

  18. Question 18. Which CSI feature can capture a point-in-time copy of a PVC?

    1. VolumeSnapshot
    2. VolumeAttachment
    3. ReplicaSet
    4. PodDisruptionBudget
    Show answer

    Answer: A. VolumeSnapshot

    VolumeSnapshots need a CSI driver that supports snapshots and a VolumeSnapshotClass.

  19. Question 19. Which volume type projects a ConfigMap's data as files into a container?

    1. emptyDir with data
    2. hostPath to /etc/config
    3. configMap volume
    4. downwardAPI with labels only
    Show answer

    Answer: C. configMap volume

    Each key becomes a file. Use items to select specific keys and paths.

  20. Question 20. A PVC is in use by a running Pod and you delete the PVC. What happens?

    1. The volume is removed immediately and the Pod crashes
    2. The PVC is recreated automatically
    3. Deletion waits until no Pod uses it, due to storage object in-use protection
    4. The PV is converted to hostPath
    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.