CertLumen

Certified Kubernetes Administrator (CKA) · Section 4 · 10% of the exam

Implement storage classes and dynamic volume provisioning

One of the objectives of the Certified Kubernetes Administrator (CKA) exam, in the section “Storage”. Here is what it covers, the points to remember and a question to try.

What it covers

A StorageClass describes a kind of storage and who creates it. With a default class, a PersistentVolumeClaim is enough: the cluster creates the volume, the PersistentVolume object and the binding for you. This lesson covers every StorageClass field the exam uses, the default-class rules, binding modes, expansion and how to debug a Pending claim.

Points to remember

  • A StorageClass is cluster-scoped, in storage.k8s.io/v1; its key fields are provisioner, parameters, reclaimPolicy, allowVolumeExpansion, volumeBindingMode, mountOptions.
  • Dynamically provisioned PVs inherit the class's reclaimPolicy, which defaults to Delete.
  • Default class: annotation storageclass.kubernetes.io/is-default-class: "true"; omitted storageClassName uses it, "" opts out.
  • A PVC created before any default class exists is updated retroactively when a default appears.
  • WaitForFirstConsumer delays provisioning until a Pod is scheduled; Immediate (the default) does not.

Try a question

Which annotation marks a StorageClass as the cluster default?

  1. Astorage.kubernetes.io/default: "true"
  2. Bvolume.kubernetes.io/default-class: enabled
  3. Ckubernetes.io/default-storage: "yes"
  4. Dstorageclass.kubernetes.io/is-default-class: "true"
Show the answer

D. Set storageclass.kubernetes.io/is-default-class to "true" on the class. kubectl get sc then shows (default) next to its name.

Written for practice in the style of the exam: never a question from the real exam.

In the course

The lesson StorageClasses and dynamic provisioning teaches this objective (about 40 minutes), and 13 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.

More in this section

← Previous objective · All 27 objectives · Next objective →