Question 798 of 302
CKA Storage Practice Question
You want to dynamically provision storage for a PVC using a StorageClass named 'fast-ssd'. Which field in the PVC YAML specifies the StorageClass?
⚠ Common exam trap
Watch out — candidates often confuse the field name `storageClassName` with similar-sounding terms like `storageClass` or `className`, or they assume a generic `class` field exists, leading them to pick a plausible but incorrect option.
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
✓
storageClassName
In Kubernetes, the field that specifies which StorageClass to use for dynamic provisioning in a PersistentVolumeClaim (PVC) is `storageClassName`. When this field is set to a valid StorageClass name (e.g., 'fast-ssd'), the system will dynamically provision a PersistentVolume using the provisioner and parameters defined in that StorageClass. If omitted, the default StorageClass (if one exists) is used.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
class
Why it's wrong here
The field "class" is not part of the PersistentVolumeClaim specification. In Kubernetes, a PVC references a StorageClass through the storageClassName field, not "class". An attempt to specify "class: mysc" in the PVC YAML will result in a validation error because the field is unknown to the Kubernetes API. The legacy annotation for this purpose is volume.beta.kubernetes.io/storage-class, which is deprecated. Therefore, using "class" will fail to provision dynamically.
- ✗
storageClass
Why it's wrong here
While "storageClass" resembles the correct "storageClassName", it is still an invalid field in the PVC spec. The exact camelCase field name is storageClassName, as defined in the PersistentVolumeClaimSpec type. Because Kubernetes uses strict decoding for API objects, specifying "storageClass" instead would either trigger a schema validation error or, in older versions, be silently ignored. This mistake prevents the PVC from referencing any StorageClass, causing dynamic provisioning to fail or fall back to the default class unintentionally.
- ✗
className
Why it's wrong here
"className" is not a recognized field for a PersistentVolumeClaim. Kubernetes does not use a generic "className" for storage; it specifically uses "storageClassName" to identify the StorageClass resource that should be used for provisioning. Unlike "storageClass" and "class", "className" could be confused with fields in other Kubernetes objects, but here it is invalid. Any PVC containing "className" will be rejected by the API server, and no storage will be provisioned.
- ✓
storageClassName
Why this is correct
The field storageClassName is the correct, canonical way to reference a StorageClass in a PersistentVolumeClaim. It tells the Kubernetes scheduler which StorageClass should be used to dynamically provision a PersistentVolume for this claim. If the StorageClass exists and is available, the provisioner associated with it creates the underlying storage, and the PV is bound to the PVC. If storageClassName is not specified, the cluster's default StorageClass is used, but explicit specification ensures the desired class is selected. This field is part of the PVC spec and is crucial for controlling storage characteristics like performance, reclaim policy, and provisioner.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jul 4, 2026
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.