Courseiva
Storage →mediumMultiple Choice

CKA Storage Practice Question

Which of the following is a required field when defining a PersistentVolume?

⚠ Common exam trap

A common mix-up: candidates confuse optional fields like `storageClassName` or `persistentVolumeReclaimPolicy` as required, because they are commonly used in examples, but the CKA exam tests the strict API schema requirement that only `capacity` is mandatory for a PersistentVolume definition.

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

✓

capacity

In Kubernetes, a PersistentVolume (PV) must define its storage capacity using the `capacity` field, which specifies the amount of storage the PV provides (e.g., `storage: 10Gi`). This is a required field because the PV represents a piece of storage in the cluster, and the scheduler and PersistentVolumeClaim (PVC) binding logic need to know the available size to match claims. Without `capacity`, the PV definition is invalid and will be rejected by the API server.

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

    While a storageClassName is commonly used to bind a PersistentVolume to a specific StorageClass, it is not a mandatory field in the PV specification. If omitted, the PV does not belong to any class and can only bind to PersistentVolumeClaims that also do not request a specific class. This allows for manual provisioning of legacy or static volumes without class association.

  • ✗

    nodeAffinity

    Why it's wrong here

    The nodeAffinity field is an optional configuration block within a PersistentVolume spec, primarily used for Local volumes to constrain which nodes can access the physical storage. For most network-attached storage types, this field is completely unnecessary and omitted. Kubernetes does not require this field to successfully create or register a standard PV.

  • ✓

    capacity

    Why this is correct

    The capacity field is a mandatory attribute in a PersistentVolume definition, specifically requiring the storage key to declare the volume's size (e.g., 10Gi). Kubernetes relies on this value during the binding process to match the PV against the storage requests of a PersistentVolumeClaim. Without specifying capacity, the API server will reject the PV manifest during validation.

  • ✗

    persistentVolumeReclaimPolicy

    Why it's wrong here

    The persistentVolumeReclaimPolicy determines what happens to the underlying storage resource after its bound PersistentVolumeClaim is deleted. While highly important for resource lifecycle management, this field is optional in the YAML definition. If it is not explicitly declared, Kubernetes automatically defaults the policy to Retain (or Delete depending on the dynamic provisioner's configuration).

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.