Courseiva
Storage →mediumMultiple Choice

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 ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

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 →

How Courseiva writes practice questions · Editorial policy

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.