Courseiva
Storage →mediumMultiple Select

CKA Storage Practice Question

Which TWO of the following are required fields in a PersistentVolumeClaim spec? (Select TWO)

⚠ Common exam trap

Test-takers frequently assume `storageClassName` is required because it is commonly used, but the CKA exam tests that only `accessModes` and `resources.requests.storage` are mandatory per the Kubernetes API spec.

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

✓

accessModes

Option C (accessModes) is correct because a PersistentVolumeClaim must declare how the volume will be mounted (e.g., ReadWriteOnce, ReadOnlyMany, ReadWriteMany), and this field is mandatory in the PVC spec. Option E (resources.requests.storage) is correct because the claim must specify the amount of storage it requests (e.g., 5Gi), which the control plane uses to bind a matching PersistentVolume. Option A (storageClassName) is not required since it can be omitted, in which case the default StorageClass is used or binding falls back to matching without a class. Option B (selector) is optional and only used to further constrain which PersistentVolumes can satisfy the claim via label matching. Option D (volumeMode) is optional and defaults to Filesystem when not specified.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    storageClassName

    Why it's wrong here

    The field storageClassName is not required when creating a PersistentVolume or a PersistentVolumeClaim. If omitted, a PVC will automatically use the cluster's default StorageClass, while a PV without it is simply unassociated with any particular storage class. It only becomes necessary when you need to pin the volume to a specific StorageClass name, such as for non-default provisioners.

  • ✗

    selector

    Why it's wrong here

    A selector is an optional mechanism that uses label matching to restrict which PersistentVolumes can be bound to a PersistentVolumeClaim. It is not a mandatory part of the schema; volumes can be bound purely by matching access modes and storage size. The field is useful for ensuring that a PVC only binds to a PV with specific attributes, but its absence does not invalidate the object.

  • ✓

    accessModes

    Why this is correct

    accessModes is a mandated field for both PersistentVolumes and PersistentVolumeClaims, and it must contain at least one valid access mode such as ReadWriteOnce, ReadOnlyMany, or ReadWriteMany. Kubernetes uses these modes to enforce how many nodes can mount the volume and whether it can be mounted read-only. Without this field, the API server will reject the claim because there is no way to determine the volume's intended access semantics.

  • ✗

    volumeMode

    Why it's wrong here

    volumeMode is an optional field that defaults to 'Filesystem' when not specified. It allows you to explicitly configure the volume as a raw block device using the value 'Block', which is necessary for certain workloads like databases requiring direct I/O. Since the default is sensible and the schema permits both values, omitting it never causes an admission failure.

  • ✓

    resources.requests.storage

    Why this is correct

    Under resources, the requests.storage subfield is required in a PersistentVolumeClaim because it declares the minimum amount of storage the claim must receive. Even though the exact size is validated against the capacity of a bound PersistentVolume, without a requested size the scheduler and controller have no basis for selecting or provisioning a volume. It is the sole resource request that a claim must specify.

About these practice questions

This CKA question is part of Courseiva's 726-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.