CKA CKA Storage and Volumes 1 — Questions and Answers
Question 1: Which Kubernetes object represents a piece of storage provisioned by an administrator in the cluster?
- PersistentVolumeClaim
- PersistentVolume (Correct answer)
- StorageClass
- ConfigMap
Correct answer: PersistentVolume
A PersistentVolume (PV) is a cluster-level storage resource provisioned by an admin or dynamically via a StorageClass.
Question 2: What does a PersistentVolumeClaim (PVC) do in Kubernetes?
- Defines a storage class for dynamic provisioning
- Requests a specific amount and type of storage from the cluster (Correct answer)
- Mounts a volume directly into a node
- Creates a new PersistentVolume automatically
Correct answer: Requests a specific amount and type of storage from the cluster
A PVC is a user's request for storage, specifying size and access mode, which the cluster fulfills by binding to a matching PV.
Question 3: Which access mode allows a PersistentVolume to be mounted as read-write by a single node?
- ReadWriteMany
- ReadOnlyMany
- ReadWriteOnce (Correct answer)
- ReadWriteAll
Correct answer: ReadWriteOnce
ReadWriteOnce (RWO) allows the volume to be mounted as read-write by exactly one node at a time.
Question 4: What happens to a PersistentVolume when its reclaim policy is set to 'Retain' and the PVC is deleted?
- The PV is automatically deleted
- The PV is immediately available for new claims
- The PV remains and must be manually reclaimed by an admin (Correct answer)
- The PV is wiped and re-provisioned
Correct answer: The PV remains and must be manually reclaimed by an admin
With the Retain policy, the PV is not deleted and holds the data until an administrator manually reclaims or deletes it.
Question 5: Which field in a PVC spec specifies the minimum storage size required?
- limits.storage
- resources.requests.storage (Correct answer)
- capacity.storage
- spec.size
Correct answer: resources.requests.storage
The `resources.requests.storage` field in a PVC spec indicates the amount of storage the claim is requesting.
Question 6: What is the state of a PersistentVolume when it is successfully bound to a PersistentVolumeClaim?
- Available
- Pending
- Bound (Correct answer)
- Released
Correct answer: Bound
Once a PV is matched and bound to a PVC, its status changes to 'Bound', meaning it is exclusively reserved for that claim.
Which Kubernetes object represents a piece of storage provisioned by an administrator in the cluster?