CertLumen

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

Configure volume types, access modes and reclaim policies

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

Pod volumes come in ephemeral and persistent kinds. Persistent storage is split into a cluster-scoped PersistentVolume and a namespaced PersistentVolumeClaim, matched by size, class and access mode. This lesson covers volume types, the four access modes, volume modes, the PV lifecycle and reclaim policies, and how to write, bind, reuse and troubleshoot PVs and PVCs.

Points to remember

  • emptyDir lasts for the life of the Pod on the node; medium: Memory makes it tmpfs.
  • hostPath is risky; prefer a local PV, which needs nodeAffinity and has no dynamic provisioning.
  • PV is cluster-scoped; PVC is namespaced and a Pod can use only claims from its own namespace.
  • Access modes: RWO is per node, ROX, RWX, RWOP is per Pod (stable since v1.29).
  • A claim binds to a PV with the same class, enough capacity and compatible access modes and volumeMode.

Try a question

A database needs a raw block device rather than a mounted file system. Which configuration is correct?

  1. AvolumeMode: Raw on the PVC and volumeMounts with mountPath in the container
  2. BaccessModes: [Block] on the PVC and volumeMounts in the container
  3. CvolumeMode: Block on the PV and PVC, and volumeDevices with devicePath in the container
  4. DvolumeMode: Filesystem on the PVC and devicePath in the container
Show the answer

C. volumeMode is Filesystem (the default) or Block. For Block, the container lists volumeDevices, and the PV and PVC must agree on the mode.

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

In the course

The lesson Volumes, access modes, reclaim policies, PVs and PVCs teaches this objective (about 50 minutes), and 16 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 →