CKAD Storage and Persistence 2 — Questions and Answers
Question 1: What does the 'Bound' status of a PersistentVolumeClaim indicate?
- The PVC is waiting for a matching PV to become available
- The PVC has been successfully matched and connected to a PV (Correct answer)
- The PVC is being deleted and the PV is being reclaimed
- The PVC has exceeded its storage limit
Correct answer: The PVC has been successfully matched and connected to a PV
A 'Bound' status means the PVC has been successfully matched to a PV that satisfies its storage requirements.
Question 2: Which access mode restricts a PersistentVolume to be mounted as read-write by only a single node at a time?
- ReadWriteMany (RWX)
- ReadOnlyMany (ROX)
- ReadWriteOncePod (RWOP)
- ReadWriteOnce (RWO) (Correct answer)
Correct answer: ReadWriteOnce (RWO)
ReadWriteOnce (RWO) restricts the volume to be mounted as read-write by a single node at a time.
Question 3: What must be included in a Pod spec to use a PersistentVolumeClaim for a container?
- A volumeMount in the container and a volumes entry referencing the PVC (Correct answer)
- Only a volumeMount with the PVC name in the container spec
- A storageClass reference and a volumes entry
- Only a volumes entry with type persistentVolumeClaim
Correct answer: A volumeMount in the container and a volumes entry referencing the PVC
Using a PVC requires both a volumes entry at the Pod level referencing the PVC and a volumeMount in the container spec specifying the mount path.
Question 4: Which reclaim policy causes the underlying storage asset to be permanently deleted when a PVC is released?
- Retain
- Recycle
- Delete (Correct answer)
- Remove
Correct answer: Delete
The Delete reclaim policy removes both the PersistentVolume object and the associated storage asset when the PVC is deleted.
Question 5: Which volume type is automatically destroyed when all containers in a Pod exit?
- persistentVolumeClaim
- hostPath
- emptyDir (Correct answer)
- nfs
Correct answer: emptyDir
An emptyDir volume is created when a Pod is assigned to a node and deleted when the Pod is removed, making it ephemeral.
Question 6: What is the primary purpose of a StorageClass in Kubernetes?
- To limit which namespaces can access storage
- To define the provisioner and parameters for dynamically provisioning PersistentVolumes (Correct answer)
- To set access control policies on existing PVs
- To automatically back up PV data on a schedule
Correct answer: To define the provisioner and parameters for dynamically provisioning PersistentVolumes
A StorageClass defines how storage is dynamically provisioned by specifying the provisioner and parameters such as disk type and replication factor.
Question 7: Which field in a PVC spec declares the minimum storage capacity the claim requires?
- storage under resources.limits
- storage under resources.requests (Correct answer)
- capacity.storage
- volumeSize
Correct answer: storage under resources.requests
The resources.requests.storage field in a PVC spec declares the minimum storage capacity required for the claim to be satisfied.
What does the 'Bound' status of a PersistentVolumeClaim indicate?