Skip to content

KCNA · Domain 2: Container Orchestration · 28% of the exam

Task 2.4: Storage

Volumes and ephemeral storage, PersistentVolumes and claims, access modes and reclaim policies, StorageClasses and dynamic provisioning, CSI drivers, snapshots, and storage for StatefulSets.

Study it

Sample questions

Try each one before opening the answer. Every option is explained, with the CNCF documentation page that proves it.

Question 1 · choose 1

A Pod keeps a scratch cache on disk. The cache must survive a crash and restart of the container, but it may be thrown away when the Pod is removed from its node. Which volume fits with the least setup?

  1. AThe container's writable layer
  2. BA claim on a PersistentVolume with the Retain policy
  3. CA hostPath volume on the node
  4. DAn emptyDir volume in the Pod spec
Show the answer and why
  • AThe container's writable layer

    Incorrect

    After a crash the kubelet restarts the container with a clean state, so files written there are lost.

  • BA claim on a PersistentVolume with the Retain policy

    Incorrect

    That keeps data well beyond the Pod's life and needs storage provisioning, which is more than this cache needs.

  • CA hostPath volume on the node

    Incorrect

    hostPath ties the Pod to a node's filesystem and outlives the Pod; it carries security risks and is not meant for scratch data.

  • DAn emptyDir volume in the Pod spec

    Correct

    An emptyDir lives as long as the Pod. A container crash does not remove the Pod, so the data survives restarts, and it is deleted when the Pod leaves the node.

Scratch space shared for the Pod's lifetime is what emptyDir provides; persistent storage is for data that must outlive the Pod.

Question 2 · choose 1

Two Pods of a content service run on different nodes, and both must write to the same shared directory at the same time. Which access mode must the PersistentVolume and its claim support?

  1. AReadWriteOnce
  2. BReadOnlyMany
  3. CReadWriteMany
  4. DReadWriteOncePod
Show the answer and why
  • AReadWriteOnce

    Incorrect

    ReadWriteOnce allows read-write mounting by a single node, so the second Pod on another node could not write.

  • BReadOnlyMany

    Incorrect

    ReadOnlyMany allows many nodes but only for reading.

  • CReadWriteMany

    Correct

    ReadWriteMany lets the volume be mounted read-write by many nodes at once.

  • DReadWriteOncePod

    Incorrect

    ReadWriteOncePod restricts read-write access to a single Pod in the whole cluster.

Access modes describe how many nodes or Pods may mount a volume and whether they may write; shared writes across nodes need ReadWriteMany and a storage backend that supports it.

Question 3 · choose 1

Developers wait days for an administrator to create a PersistentVolume each time they need storage. The team wants a claim to get a new volume created automatically. What should the administrator set up?

  1. AA larger pool of PersistentVolumes created ahead of time by hand
  2. BA StorageClass with a provisioner that the claims name
  3. CA ResourceQuota on requests.storage in each namespace
  4. DAn emptyDir volume in each Pod that needs storage
Show the answer and why
  • AA larger pool of PersistentVolumes created ahead of time by hand

    Incorrect

    Pre-creating volumes is static provisioning; it shortens the wait but still needs an administrator to keep the pool filled.

  • BA StorageClass with a provisioner that the claims name

    Correct

    Dynamic provisioning creates a volume on demand when a claim names a StorageClass whose provisioner can create it.

  • CA ResourceQuota on requests.storage in each namespace

    Incorrect

    A quota caps how much storage a namespace may claim; it creates nothing.

  • DAn emptyDir volume in each Pod that needs storage

    Incorrect

    emptyDir is scratch space that disappears with the Pod, not a provisioned persistent volume.

StorageClasses describe kinds of storage and the provisioner that creates them, which lets claims trigger volume creation on demand.

Question 4 · choose 2

A database runs as a StatefulSet with three replicas and a volumeClaimTemplates entry, and its persistentVolumeClaimRetentionPolicy is left at the default. Which two behaviors should the team expect? (Choose TWO.)

  1. AThe three replicas share one claim created from the template
  2. BScaling down from three replicas to two deletes the third replica's claim at once
  3. CThe claims are created in the kube-system namespace
  4. DEach replica gets its own PersistentVolumeClaim
  5. EA replacement Pod for a replica mounts the claim that replica used before
Show the answer and why
  • AThe three replicas share one claim created from the template

    Incorrect

    The template is stamped out once per Pod; replicas do not share one claim.

  • BScaling down from three replicas to two deletes the third replica's claim at once

    Incorrect

    The default retention policy is Retain, so claims stay when the set scales down unless the policy is changed.

  • CThe claims are created in the kube-system namespace

    Incorrect

    Claims are created in the StatefulSet's own namespace, next to the Pods that use them.

  • DEach replica gets its own PersistentVolumeClaim

    Correct

    For each volumeClaimTemplates entry, every Pod in the StatefulSet receives its own claim.

  • EA replacement Pod for a replica mounts the claim that replica used before

    Correct

    When a Pod is rescheduled, its volume mounts use the claims tied to its identity, so the data comes back with it.

StatefulSets give each replica stable storage: one claim per Pod per template, reattached when the Pod comes back, and kept by default when the set shrinks or is deleted.

Question 5 · choose 1

A Pod in the namespace web references a PersistentVolumeClaim that was created in the namespace data, and the Pod cannot use it. Why?

  1. AA claim must be in the same namespace as the Pod that uses it
  2. BClaims are meant for StatefulSets, not for plain Pods
  3. CThe claim needs the ReadWriteMany access mode first
  4. DPersistentVolumeClaims are cluster-scoped and cannot be referenced
Show the answer and why
  • AA claim must be in the same namespace as the Pod that uses it

    Correct

    Claims must exist in the same namespace as the Pod using the claim.

  • BClaims are meant for StatefulSets, not for plain Pods

    Incorrect

    Any Pod can use a claim in its namespace.

  • CThe claim needs the ReadWriteMany access mode first

    Incorrect

    Access modes do not lift the namespace rule.

  • DPersistentVolumeClaims are cluster-scoped and cannot be referenced

    Incorrect

    Claims are namespaced; that is why the namespace matters.

Pods reach storage through claims in their own namespace.

Question 6 · choose 1

A ConfigMap has the keys app.properties and log.level, and a Pod mounts it as a volume at /etc/config without listing any items. What does the container see there?

  1. AOne file named configmap.yaml that holds both keys
  2. BEnvironment variables named after the two keys
  3. CTwo files, app.properties and log.level
  4. DAn empty directory until the keys are listed under items
Show the answer and why
  • AOne file named configmap.yaml that holds both keys

    Incorrect

    The ConfigMap object is not written out as one YAML file; its keys are projected one by one.

  • BEnvironment variables named after the two keys

    Incorrect

    Keys become environment variables through the container's environment settings in the Pod spec, not through a volume.

  • CTwo files, app.properties and log.level

    Correct

    Each key in the ConfigMap's data becomes a file name under the mount path, with the value as the file's content.

  • DAn empty directory until the keys are listed under items

    Incorrect

    items is optional and places chosen keys at specific paths; a plain mount without it projects every key in the ConfigMap as a file.

A mounted ConfigMap turns each key into a file, which suits applications that read configuration files. The optional items field places chosen keys at specific paths, and mounted keys are refreshed after the ConfigMap changes.

Question 7 · choose 1

A claim bound to a PersistentVolume with reclaimPolicy Retain is deleted. The volume now shows status Released, and a new claim does not bind to it. Why?

  1. AReleased volumes are deleted automatically within an hour
  2. BIt still holds the old data and waits to be reclaimed by an admin
  3. CThe new claim must use the old claim's name
  4. DThe volume must be expanded before it can bind again
Show the answer and why
  • AReleased volumes are deleted automatically within an hour

    Incorrect

    With Retain, nothing deletes the volume automatically.

  • BIt still holds the old data and waits to be reclaimed by an admin

    Correct

    Released means the claim is gone but the resource is not yet reclaimed; it is not available for another claim.

  • CThe new claim must use the old claim's name

    Incorrect

    Names do not reconnect a released volume.

  • DThe volume must be expanded before it can bind again

    Incorrect

    Size is not the problem; its released state is.

Retained volumes move to Released and wait for manual cleanup before they can be used again.

Question 8 · choose 1

A platform offers fast SSD storage for databases and cheaper standard disks for logs. How should it present these choices to developers?

  1. AAs two namespaces, one for each disk type
  2. BAs two node labels on the storage nodes
  3. CAs two StorageClasses, chosen by storageClassName
  4. DAs two access modes on the same class
Show the answer and why
  • AAs two namespaces, one for each disk type

    Incorrect

    Namespaces group objects; they do not choose storage types.

  • BAs two node labels on the storage nodes

    Incorrect

    Node labels describe nodes, not the type of disk a claim gets.

  • CAs two StorageClasses, chosen by storageClassName

    Correct

    StorageClasses describe classes of storage, such as performance tiers, and claims pick one by name.

  • DAs two access modes on the same class

    Incorrect

    Access modes describe how volumes are mounted, not their tier.

Administrators describe the storage they offer as StorageClasses, for example by quality of service.

Practise domain 2 →Practise all domains →