CKA Storage Practice Question
An administrator applies the following YAML: --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: my-pvc spec: accessModes: - ReadWriteOnce resources: requests: storage: 5Gi storageClassName: "" --- What does setting storageClassName to an empty string achieve?
⚠ Common exam trap
A common mix-up: candidates confuse an empty string with omitting the field entirely, but omitting it triggers the default StorageClass, while an empty string explicitly prevents any default from being used.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
It ensures the PVC binds only to a PV with no storage class defined
Setting `storageClassName` to an empty string (`""`) explicitly tells Kubernetes to bind the PVC only to a PV that also has no `storageClassName` defined (i.e., a static PV with an empty or omitted storage class). This bypasses any default StorageClass in the cluster, preventing dynamic provisioning and ensuring the PVC matches only pre-provisioned PVs with no storage class.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
It disables storage for the PVC
Why it's wrong here
Setting storageClassName to an empty string does not disable or cancel the storage request of the PersistentVolumeClaim. The PVC still requests a specific capacity and access mode; it simply instructs the control loop to bypass dynamic provisioning and look for an existing, statically provisioned PersistentVolume that also lacks a storage class.
- ✓
It ensures the PVC binds only to a PV with no storage class defined
Why this is correct
When storageClassName is explicitly set to an empty string, Kubernetes restricts the binding process to PersistentVolumes that also have their storageClassName set to an empty string or omitted entirely. This behavior prevents the PVC from binding to any PV associated with a specific StorageClass, ensuring strict matching with statically created, classless PVs.
- ✗
It triggers dynamic provisioning using the default StorageClass
Why it's wrong here
Dynamic provisioning is explicitly disabled when storageClassName is set to an empty string. To trigger dynamic provisioning, the PVC must either specify a valid, existing StorageClass name or omit the field entirely to fall back on the cluster's default StorageClass, assuming one is configured.
- ✗
It assigns the default StorageClass automatically
Why it's wrong here
An empty string does not trigger the default StorageClass; instead, it explicitly overrides the default behavior. To automatically assign the cluster's default StorageClass, the storageClassName field must be completely omitted from the PVC specification or set to null, which allows the admission controller to inject the default class.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
Learn chapter
Installing Kubernetes with kubeadm
Key term
Storage Classes
A Storage Class in Kubernetes is a template that defines how persistent storage is provisioned automatically, including the type of storage, performance characteristics, and provisioning policies.
Key term
Network Policies
A Kubernetes resource that controls how pods communicate with each other and with other network endpoints, acting as a firewall for pod-to-pod traffic.
About these practice questions
Courseiva writes every CKA question from scratch — 726 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CKA practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CKA exam.