Courseiva
StoragehardMultiple ChoiceObjective-mapped

CKA Storage Practice Question

You need to allow a pod to use a specific device from the host node (e.g., /dev/sdb) as a raw block device. Which volume mode should you set in the PVC?

⚠ Common exam trap

It's easy for candidates to confuse the 'Block' volume mode with the deprecated 'Raw' or 'Device' terminology from other systems, or assume 'Filesystem' is the only option, missing that raw block access requires explicit mode selection.

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

Block

To use a host device like /dev/sdb as a raw block device inside a pod, the PersistentVolumeClaim (PVC) must specify `volumeMode: Block`. This tells Kubernetes to expose the volume as a raw block device (e.g., /dev/xxx) inside the container, rather than mounting a filesystem. Only the `Block` volume mode supports this behavior, as defined in the Kubernetes PersistentVolume API.

Answer analysis

Option-by-option breakdown

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

  • Device

    Why it's wrong here

    The value 'Device' is not part of Kubernetes' volumeMode API enumeration, which accepts only 'Filesystem' or 'Block'. It is also not a valid volume source type. When a pod needs raw host device access, the correct approach is to define a volume with volumeMode: Block and then list that volume in the container's volumeDevices, not to use a value named 'Device'. Attempting to set volumeMode: Device causes the API server to reject the pod specification as invalid.

  • Raw

    Why it's wrong here

    'Raw' is not an accepted enumerator for volumeMode in the Pod spec; the Kubernetes API validation rejects any mode other than 'Filesystem' (the default) or 'Block'. While the phrase 'raw block device' describes how a Block-mode volume is exposed, 'Raw' alone is not a symbolic value you can put in YAML. To actually use a raw device, specify volumeMode: Block and define a volumeDevices entry with a devicePath such as /dev/disk/by-id/...; the word 'raw' is never written in the spec.

  • Block

    Why this is correct

    Setting volumeMode: Block on a volume causes Kubernetes to present the backing storage as an unformatted raw block device inside the container. You must attach it through the container's volumeDevices list, providing a devicePath (e.g., /dev/xvdb), rather than using volumeMounts and a mountPath. This is required for workloads such as databases or storage engines that manage their own on-disk layout and want to bypass the filesystem layer entirely. Only Block mode supports this raw device access model.

  • Filesystem

    Why it's wrong here

    Explicitly setting volumeMode: Filesystem, or omitting it (since it is the default), mounts the volume into the container as a formatted filesystem at a mountPath. The container then interacts with ordinary files and directories, so the underlying device is accessed through the kernel's filesystem layer rather than as a raw device. This mode does not satisfy a requirement to use a specific device directly, because the pod cannot perform block-level operations such as low-level reads, writes, or partitioning. Use Block mode instead for true raw device access.

About these practice questions

Courseiva writes every CKA question from scratch — 302 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.