CCNA Cka Storage Questions

75 of 114 questions · Page 1/2 · Cka Storage topic · Answers revealed

1
MCQeasy

A team is deploying a stateful application that requires persistent storage. The application runs on multiple pods that need to share the same volume. Which volume type should be used?

A.Create a PersistentVolumeClaim with access mode ReadOnlyMany and mount it in each pod.
B.Create a PersistentVolumeClaim with access mode ReadWriteMany and use a supported storage class like NFS.
C.Create a PersistentVolumeClaim with access mode ReadWriteOnce and mount it in each pod.
D.Use a hostPath volume configured on each node where pods are scheduled.
AnswerB

RWX allows multiple pods to write concurrently, which matches the requirement.

Why this answer

Option B is correct because a stateful application with multiple pods that need to share the same volume requires a ReadWriteMany (RWX) access mode, which allows concurrent read-write access from multiple pods. A supported storage class like NFS provides the necessary network filesystem protocol to enable this shared access across pods, potentially on different nodes.

Exam trap

The trap here is that candidates often confuse ReadWriteOnce (RWO) with the ability to share a volume across pods, not realizing that RWO strictly limits access to a single pod, while ReadWriteMany (RWX) is the only access mode that supports concurrent multi-pod read-write access.

How to eliminate wrong answers

Option A is wrong because ReadOnlyMany (ROX) allows multiple pods to read from the volume simultaneously but does not permit write access, which is required for a stateful application that needs persistent storage. Option C is wrong because ReadWriteOnce (RWO) restricts the volume to be mounted as read-write by a single pod on a single node, preventing multiple pods from sharing the same volume. Option D is wrong because hostPath volumes are tied to a specific node's filesystem, so pods scheduled on different nodes cannot access the same data, and they lack the network-based sharing required for multi-pod access.

2
MCQeasy

Which of the following is a valid command to create a PersistentVolume named 'pv-demo' using a YAML manifest file named 'pv.yaml'?

A.kubectl create pv -f pv.yaml
B.kubectl apply -f pv.yaml
C.kubectl create persistentvolume -f pv.yaml
D.kubectl run pv-demo --image=pv --restart=Never
AnswerB

This is the standard way to create resources from a manifest file.

Why this answer

The correct command is 'kubectl apply -f pv.yaml' which creates or updates resources defined in the manifest file. The other options use incorrect or nonexistent flags.

3
MCQmedium

A DevOps team needs to deploy a stateful application that requires persistent storage with ReadWriteMany access mode across multiple pods running on different nodes. Which Kubernetes resource should they use to provision the storage?

A.A hostPath volume
B.A PersistentVolume with access mode ReadWriteOnce
C.A PersistentVolume with access mode ReadWriteMany
D.An emptyDir volume
AnswerC

ReadWriteMany allows multiple pods across nodes to read and write.

Why this answer

ReadWriteMany (RWX) is the only access mode that allows multiple pods across different nodes to simultaneously read and write to the same persistent storage volume. A PersistentVolume with access mode ReadWriteMany meets the requirement for a stateful application needing concurrent access from pods running on different nodes, typically backed by network filesystems like NFS, GlusterFS, or CephFS.

Exam trap

The trap here is that candidates often confuse ReadWriteOnce (RWO) with multi-pod access, but RWO restricts access to a single node, not a single pod, so multiple pods on the same node can share an RWO volume, but pods on different nodes cannot, making it unsuitable for the stated requirement.

How to eliminate wrong answers

Option A is wrong because a hostPath volume mounts a directory from the host node's filesystem into the pod, which does not support multi-node access; pods scheduled on different nodes would see different host directories, and it is not a persistent storage abstraction managed by Kubernetes. Option B is wrong because a PersistentVolume with access mode ReadWriteOnce (RWO) can only be mounted as read-write by a single node at a time, preventing concurrent access from pods on different nodes. Option D is wrong because an emptyDir volume is ephemeral and tied to the pod's lifecycle; it is created empty when a pod starts and is deleted when the pod is removed, providing no persistent storage across pod restarts or multi-node access.

4
Drag & Dropmedium

Drag and drop the steps to perform a rolling update of a Deployment using kubectl into the correct order.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order

Why this order

Update the YAML, apply, monitor status, check history, and rollback if needed.

5
Multi-Selectmedium

Which TWO of the following are required for dynamic provisioning of PersistentVolumes using a StorageClass?

Select 2 answers
A.A StorageClass with allowVolumeExpansion: true
B.A StorageClass with volumeBindingMode: WaitForFirstConsumer
C.A PersistentVolumeClaim that references the StorageClass
D.A default StorageClass must be defined
E.A StorageClass with a provisioner defined
AnswersC, E

The PVC must specify the StorageClass to trigger dynamic provisioning.

Why this answer

Options A and D are correct: A StorageClass must reference a provisioner (e.g., kubernetes.io/aws-ebs), and a PVC must reference that StorageClass to trigger dynamic provisioning. Option B is not required; allowVolumeExpansion is optional. Option C is not required; volumeBindingMode defaults to Immediate.

Option E is not required; a default StorageClass is optional.

6
MCQeasy

Which of the following volume types is designed to store sensitive information such as passwords or tokens?

A.emptyDir
B.hostPath
C.secret
D.configMap
AnswerC

Secrets are specifically for sensitive data like passwords, tokens, or keys.

Why this answer

Secrets are Kubernetes objects designed to hold sensitive data. They can be mounted as volumes into pods.

7
Multi-Selecthard

An administrator needs to expand an existing PersistentVolumeClaim. Which TWO conditions must be met?

Select 2 answers
A.The PVC must be currently mounted by at least one pod.
B.The underlying PersistentVolume must be deleted first.
C.The StorageClass used by the PVC must have 'allowVolumeExpansion: true'.
D.The PersistentVolume's reclaim policy must be Recycle.
E.The PVC must be bound to a PersistentVolume.
AnswersC, E

This setting permits volume expansion for PVCs using that StorageClass.

Why this answer

The PVC must be bound to a PV (A), and the StorageClass must have 'allowVolumeExpansion: true' (B). The PVC does not need to be in use by a pod (C), the PV does not need to be deleted (D), and the reclaim policy does not need to be Recycle (E).

8
MCQeasy

An administrator needs to create a PersistentVolume with 10Gi capacity, ReadWriteOnce access mode, and a reclaim policy of Retain. Which YAML snippet correctly defines this PV?

A.apiVersion: v1 kind: PersistentVolume metadata: name: pv-example spec: capacity: storage: 10Gi accessModes: - ReadWriteMany persistentVolumeReclaimPolicy: Retain hostPath: path: /data/pv
B.apiVersion: v1 kind: PersistentVolume metadata: name: pv-example spec: capacity: storage: 10Gi accessMode: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain hostPath: path: /data/pv
C.apiVersion: v1 kind: PersistentVolume metadata: name: pv-example spec: capacity: storage: 10Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain hostPath: path: /data/pv
D.apiVersion: v1 kind: PersistentVolume metadata: name: pv-example spec: capacity: storage: 10Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Delete hostPath: path: /data/pv
AnswerC

Correctly defines capacity, accessModes, and reclaim policy as Retain.

Why this answer

Option A correctly sets capacity.storage, accessModes, and persistentVolumeReclaimPolicy. Option B uses ReadWriteMany which is not required. Option C uses Delete policy instead of Retain.

Option D has incorrect field name 'accessMode' (should be 'accessModes').

9
MCQhard

Which CSI driver feature must be supported by the driver to allow expanding a PVC while the pod using it is still running?

A.Volume attach
B.Volume expansion
C.Mount options
D.ExpandInUsePersistentVolume
AnswerD

This capability in the CSIDriver spec allows expansion while the volume is in use by a pod.

Why this answer

Online expansion requires the CSIDriver object to have the 'ExpandInUsePersistentVolume' capability set to true.

10
MCQhard

A PersistentVolumeClaim named 'pvc-data' is stuck in Pending state. Running 'kubectl describe pvc pvc-data' shows: 'waiting for a volume to be created, either by external provisioner or by manually creating a PersistentVolume'. The cluster has a default StorageClass named 'fast-ssd' with a provisioner 'kubernetes.io/gce-pd'. What is the most likely cause?

A.The cluster has no nodes with the required storage driver.
B.The PVC requests a capacity that exceeds the available quota.
C.The volumeBindingMode is set to WaitForFirstConsumer.
D.The PVC's storage class name is misspelled.
AnswerC

With WaitForFirstConsumer, the volume is not provisioned until a pod using the PVC is scheduled. The PVC remains Pending until then.

Why this answer

The message indicates dynamic provisioning is stalled. This commonly happens if the StorageClass's volumeBindingMode is set to WaitForFirstConsumer and no pod has claimed the PVC yet. The PVC will stay Pending until a pod uses it, at which point the volume is created in the correct zone.

11
Multi-Selectmedium

Which TWO of the following statements about StorageClass are correct? (Select two.)

Select 2 answers
A.A StorageClass must have a provisioner field set to 'kubernetes.io/no-provisioner' to use static provisioning.
B.A StorageClass is a namespaced resource.
C.The reclaimPolicy in a StorageClass defaults to Retain.
D.A StorageClass can be used for dynamic provisioning of PersistentVolumes.
E.A StorageClass can specify a volumeBindingMode, which can be Immediate or WaitForFirstConsumer.
AnswersD, E

StorageClass defines a provisioner that creates PVs dynamically.

Why this answer

StorageClass allows dynamic provisioning and has a reclaimPolicy that defaults to Delete. It also can specify volumeBindingMode. The provisioner field is required.

So correct: A and C.

12
MCQhard

A StatefulSet named 'web' is defined with a volumeClaimTemplate. The StatefulSet has replicas: 3. The volumeClaimTemplate specifies storage: 1Gi and storageClassName: 'ssd'. After the StatefulSet is created, you run 'kubectl get pvc' and see three PVCs named 'www-web-0', 'www-web-1', and 'www-web-2'. What is the name of the PersistentVolumeClaim template used in the StatefulSet?

A.web-www
B.web
C.www
D.ssd
AnswerC

The PVC naming pattern is <template-name>-<statefulset-name>-<ordinal>. Here it's 'www-web-0', so template name is 'www'.

Why this answer

In a StatefulSet volumeClaimTemplate, the PVCs are named as <template-name>-<statefulset-name>-<ordinal>. The observed PVCs are 'www-web-0', 'www-web-1', 'www-web-2'. The pattern: the template name is 'www', the StatefulSet name is 'web', and the ordinals are 0,1,2.

So the template name is 'www'.

13
Multi-Selectmedium

Which TWO of the following are valid access modes for PersistentVolumes?

Select 2 answers
A.ReadOnlyMany (ROX)
B.ReadWriteMany (RWX)
C.ReadWriteOnce (RWO)
D.WriteOnce (WO)
E.ReadWriteOncePod (RWOP)
AnswersA, C

ROX is a valid access mode.

Why this answer

Valid access modes include ReadWriteOnce (RWO) and ReadOnlyMany (ROX). ReadWriteMany (RWX) is also valid but not listed as a correct option here. ReadWriteOncePod (RWOP) is valid but not listed.

WriteOnce is not a valid access mode.

14
MCQhard

You are a cluster administrator for a multi-tenant Kubernetes cluster. Each tenant runs a set of microservices in their own namespace. The cluster uses a custom CSI driver that provisions storage on a NetApp storage array. Recently, several tenants reported that their pods are stuck in Pending state with events indicating 'failed to provision volume' and 'timeout waiting for a volume to be created'. Upon investigation, you notice that the CSI controller pod is running but has high memory usage, and logs show 'context deadline exceeded' errors when calling the storage array API. The storage array is healthy and responsive to manual API calls from your workstation. Meanwhile, PVCs created in a test namespace with the same StorageClass succeed. What is the most likely cause and the best course of action?

A.Adjust the CSI driver configuration to increase the maximum number of concurrent operations and reduce the request timeout
B.Increase the memory limit of the CSI controller pod to reduce OOM risk
C.Restart the CSI controller pod to clear its memory and reset connections
D.Add a network policy to isolate tenant namespaces to reduce load on the CSI driver
AnswerA

Increasing concurrency and reducing timeouts can help handle the volume of requests and prevent the gRPC connection pool from being exhausted.

Why this answer

Option A is correct because the 'context deadline exceeded' errors and high memory usage in the CSI controller pod indicate that the driver is overwhelmed by the number of concurrent volume provisioning requests, causing timeouts. Increasing the maximum number of concurrent operations allows the driver to handle more requests in parallel, while reducing the request timeout prevents long waits for unresponsive calls, aligning with the healthy storage array and successful test PVCs.

Exam trap

The trap here is that candidates may focus on the high memory usage and assume an OOM issue (Option B) or a transient failure (Option C), rather than recognizing the concurrency and timeout misconfiguration as the root cause of the provisioning failures.

How to eliminate wrong answers

Option B is wrong because increasing the memory limit does not address the root cause of timeouts due to excessive concurrent operations; high memory usage is a symptom, not the cause, and OOM risk is not indicated. Option C is wrong because restarting the CSI controller pod would only temporarily clear memory and reset connections, but the same workload pattern would quickly re-create the timeout issue, making it a non-permanent fix. Option D is wrong because network policies isolate traffic at the network layer, not the CSI driver's internal request handling; tenant namespaces do not directly affect the CSI controller's ability to provision volumes, and the issue is with the driver's concurrency limits, not network congestion.

15
MCQmedium

A new StorageClass 'fast' is created with volumeBindingMode: WaitForFirstConsumer. A PVC using this StorageClass is created but no pod consumes it. What is the state of the PVC immediately after creation?

A.Bound
B.Pending
C.Lost
D.The PVC will not be created
AnswerB

The PVC will be in Pending state until a pod consumes it, at which point the volume is provisioned and bound.

Why this answer

Option B is correct: When volumeBindingMode is WaitForFirstConsumer, the PVC remains in 'Pending' until a pod using it is scheduled. The volume is not provisioned until a consumer exists. Option A would be true for Immediate mode.

Option C is incorrect because the PVC does not fail. Option D is incorrect because the PVC is created but not bound.

16
MCQhard

A StatefulSet named 'web' uses volumeClaimTemplates to create a PVC named 'data' with storage class 'ssd'. The StatefulSet has 3 replicas. After scaling down to 2 replicas, what happens to the PVC of the third pod (web-2)?

A.The PVC is detached but not deleted
B.The PVC remains and must be manually deleted if not needed
C.The PVC's reclaim policy determines its fate
D.The PVC is automatically deleted along with the pod
AnswerB

PVCs are retained to preserve data. The admin must manually delete them.

Why this answer

StatefulSet does not delete PVCs when scaling down to prevent data loss. The PVC remains until manually deleted.

17
MCQhard

You create a StorageClass with volumeBindingMode: WaitForFirstConsumer. A PVC using this StorageClass is created but remains in 'Pending' state. The PVC expects a node with label 'disktype=ssd'. A suitable node exists. What is the MOST likely reason the PVC is still Pending?

A.The node selector on the PVC is incorrect.
B.The PVC requests a storage size larger than available.
C.No pod has been created that uses this PVC.
D.The persistentVolumeReclaimPolicy is set to Retain.
AnswerC

WaitForFirstConsumer delays binding until a pod consumes the PVC.

Why this answer

With WaitForFirstConsumer, the volume is not provisioned until a pod using the PVC is scheduled. The PVC will remain Pending until a pod references it.

18
Multi-Selectmedium

Which TWO of the following are valid reclaim policies for a PersistentVolume? (Select TWO)

Select 2 answers
A.Retain
B.Delete
C.Recycle
D.Preserve
E.Archive
AnswersA, B

Retain keeps the volume data and the PV in Released state.

Why this answer

The valid reclaim policies in Kubernetes are Retain, Delete, and Recycle (deprecated). From the options, Retain and Delete are valid. Recycle is also valid but deprecated.

The question expects Retain and Delete as the most commonly used.

19
MCQmedium

A developer creates a YAML manifest for a pod that uses a PersistentVolumeClaim. The PVC requests 5Gi of storage but the only available PV has 10Gi. What will happen when the pod is created?

A.The PV will be resized to 5Gi to match the PVC.
B.The PVC will bind to the PV and the pod will run.
C.The PVC will not bind and the pod will remain Pending.
D.The PVC will bind but the pod will be OOMKilled.
AnswerB

A PVC can bind to a PV that has more storage than requested.

Why this answer

A PVC can bind to a PV with larger capacity as long as the PV meets all other requirements (access modes, etc.). The PVC will bind and the pod will run.

20
MCQmedium

An administrator runs 'kubectl get pvc' and sees a PVC with status 'Lost'. What does this status indicate?

A.The PVC requested more storage than the available PV can provide
B.The pod using the PVC has been deleted
C.The PVC's storage class does not match any available PV
D.The PV that was bound to the PVC has been deleted or is no longer available
AnswerD

'Lost' status occurs when the underlying PV is removed or becomes unavailable.

Why this answer

Option B is correct: 'Lost' means the PV that was bound to the PVC no longer exists, leaving the PVC orphaned. Option A is incorrect because 'Lost' is not related to storage class mismatch. Option C is incorrect because 'Lost' does not indicate capacity exceeded.

Option D is incorrect because 'Lost' is about the PV, not the pod.

21
MCQmedium

A cluster administrator creates a PersistentVolume with the following YAML: apiVersion: v1 kind: PersistentVolume metadata: name: pv-example spec: capacity: storage: 1Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain hostPath: path: /data/pv A user creates a PersistentVolumeClaim requesting 500Mi with access mode ReadWriteOnce and no storage class. The PVC remains in Pending state. What is the most likely cause?

A.The PV's reclaim policy is Retain, so it is in Released state and cannot be bound to a new PVC.
B.The cluster has a default StorageClass defined, causing the PVC to attempt dynamic provisioning instead of binding to this static PV.
C.The hostPath path /data/pv does not exist on any node in the cluster.
D.The PVC requests 500Mi, but the PV has 1Gi capacity, which is larger than requested, so the PVC cannot bind to it.
AnswerB

When a default StorageClass exists, a PVC without a storageClassName will use that class for dynamic provisioning, ignoring static PVs without a matching class.

Why this answer

The PVC remains Pending because the PV's capacity is 1Gi, which is sufficient, and access modes match. However, the PV does not specify a storageClassName, so it is considered a 'default storage class' PV only if the cluster has a default storage class and the PV has the annotation or a matching class. Since the PVC also has no storage class, it will try to use the default storage class (if any) for dynamic provisioning, but the PV is statically provisioned without a storage class. The PVC will not bind to a PV without a matching storage class. The issue is that the PV has no storageClassName and the cluster may have a default storage class, or the PV's storage class is empty, which does not match the PVC's empty storage class? Actually, both have empty storage class, so they should match. But there is another subtlety: the PVC's storage class name is empty string, and the PV's storage class name is also empty string (since not specified). In Kubernetes, an empty string storage class name means the PV does not use any storage class, and the PVC without a storage class will try to bind to a PV with the same empty storage class. However, if the cluster has a default storage class defined, the PVC without a storage class will use that default storage class for dynamic provisioning, not static binding. The PVC will remain Pending because dynamic provisioning may not be configured or the PV is not suitable. The most likely cause is that the PV's hostPath path does not exist on the node. In CKA, hostPath PVs require the path to exist on the node where the pod runs. If the path does not exist, the PV will be created but the pod will fail. However, the PVC is Pending, not the pod. Actually, PVC binding does not depend on the hostPath path existence. The PVC will bind to the PV if capacity and access modes match and storage class matches. The PVC is Pending, meaning it's not bound. Since both have empty storage class, they should match. But if the PV is not marked as Available (e.g., it might be Released or Failed), it won't bind. The reclaim policy is Retain, so after a PVC is deleted, the PV remains in Released state, not Available. But if this is a new PV, it should be Available. Possibly the PV has been used before and is in Released state. However, the question doesn't indicate that. Another common issue: the PV's capacity is 1Gi, PVC requests 500Mi, that's fine. The access modes match. The most likely cause in a real scenario is that the PVC's storage class name is empty and the PV's storage class name is also empty, but the cluster has a default storage class, so the PVC expects dynamic provisioning from that default class, ignoring static PVs. That could cause Pending. But the correct answer should be that the PV's hostPath path does not exist on the node? That would cause pod scheduling failure, not PVC Pending. The PVC Pending is usually due to no PV matching the request. Since both have empty storage class, they should match. However, if the PV is not using a storage class (empty string) and the PVC is also empty string, they should bind. But in Kubernetes, when you don't specify a storage class in PVC, it uses the default storage class if one exists, otherwise it looks for PVs with empty storage class. So if a default storage class exists, the PVC will try to dynamically provision from that default class, not bind to a static PV with no class. That is the likely cause. So the answer is that the cluster has a default storage class, causing the PVC to ignore the static PV. But the options may include that. Let's design the options.

Options:

A: The PVC requests 500Mi but the PV has 1Gi, which is not a match? (Incorrect, PV capacity must be >= PVC, 1Gi >= 500Mi)

B: The hostPath /data/pv does not exist on any node (Incorrect, that affects pod, not PVC binding)

C: The PV's reclaim policy is Retain, so it cannot be bound to a new PVC (Partially correct: if PV is in Released state, it won't bind, but a new PV is Available)

D: The cluster has a default StorageClass defined, causing the PVC to expect dynamic provisioning instead of binding to this static PV (Correct)

Thus D is correct.

22
MCQmedium

An administrator applies the following YAML: --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: my-pvc spec: accessModes: - ReadWriteOnce resources: requests: storage: 5Gi storageClassName: "" --- What does setting storageClassName to an empty string achieve?

A.It disables storage for the PVC
B.It ensures the PVC binds only to a PV with no storage class defined
C.It triggers dynamic provisioning using the default StorageClass
D.It assigns the default StorageClass automatically
AnswerB

An empty string means the PVC will only bind to PVs that also have storageClassName set to empty string.

Why this answer

Option A is correct: setting storageClassName to an empty string explicitly binds to a PV without a storage class (i.e., a static PV with no storageClassName). It does not use the default StorageClass. Option B is incorrect because an empty string does not trigger dynamic provisioning.

Option C is incorrect because it does not disable storage entirely. Option D is incorrect because empty string is not the default.

23
MCQhard

A cluster administrator needs to provide storage to a pod that must read and write files, but the data does not need to persist beyond the pod's lifecycle. Which volume type should be used?

A.hostPath
B.emptyDir
C.configMap
D.PersistentVolumeClaim
AnswerB

emptyDir provides temporary storage that is deleted when the pod terminates.

Why this answer

B is correct because emptyDir creates an empty volume that is provisioned when a pod is assigned to a node and exists as long as the pod is running. It allows both reading and writing files, and its contents are deleted when the pod is removed, matching the requirement that data does not need to persist beyond the pod's lifecycle.

Exam trap

The trap here is that candidates often confuse emptyDir with hostPath, thinking both provide temporary storage, but hostPath persists on the node and can cause data leakage or node-specific issues, while emptyDir is truly ephemeral and tied to the pod's lifecycle.

How to eliminate wrong answers

Option A is wrong because hostPath mounts a file or directory from the host node's filesystem into the pod, and data persists on the node even after the pod is deleted, which violates the requirement that data does not need to persist beyond the pod's lifecycle. Option C is wrong because configMap is designed to inject configuration data as files or environment variables, and while it can be mounted as a volume, it is read-only by default and not intended for read/write file storage. Option D is wrong because PersistentVolumeClaim is used to request persistent storage that outlives the pod, which directly contradicts the requirement that data does not need to persist beyond the pod's lifecycle.

24
MCQeasy

Which command creates a PersistentVolume named 'pv-data' that uses a hostPath volume located at '/mnt/data' with a storage capacity of 10Gi and access mode ReadWriteOnce?

A.kubectl create pv pv-data --capacity=10Gi --access-modes=ReadWriteOnce --hostpath=/mnt/data
B.kubectl apply -f pv.yaml
C.kubectl run pv-data --image=nginx --hostpath=/mnt/data
D.kubectl create -f pv.yaml
AnswerB

This command applies a YAML manifest that defines the PV with the required specifications.

Why this answer

The correct command uses 'kubectl create -f' with a YAML file. The YAML is the standard way to create a PV with specific settings.

25
Multi-Selectmedium

Which TWO statements about emptyDir volumes are correct?

Select 2 answers
A.An emptyDir volume is created empty when a Pod is assigned to a node.
B.An emptyDir volume can be shared between Pods on different nodes.
C.An emptyDir volume persists across pod restarts.
D.An emptyDir volume is deleted when the Pod is removed from the node.
E.An emptyDir volume requires a PersistentVolume.
AnswersA, D

emptyDir starts as an empty directory on the node.

Why this answer

emptyDir starts empty (A) and is deleted when the pod is removed (E). It is not persistent across pod restarts, and it does not require a PV or PVC. Options B and D are incorrect.

Option C is false because emptyDir is not meant for inter-pod sharing.

26
MCQmedium

A Pod is configured with a volume that uses a ConfigMap. The ConfigMap is updated after the Pod is running. How can the Pod access the updated data without restarting?

A.The ConfigMap must be deleted and recreated.
B.The Node must be rebooted.
C.The Pod will automatically see the updated data within minutes.
D.The Pod must be deleted and recreated.
AnswerC

Kubelet periodically syncs ConfigMap data; mounted volumes are updated automatically (without subPath).

Why this answer

When a ConfigMap is mounted as a volume using subPath, updates are not automatically reflected. However, if the volume uses the entire ConfigMap (not subPath), the files are updated automatically after a delay (kubelet sync period). If subPath is used, the Pod must be restarted to pick up changes.

The question implies a volume mount, not subPath, so the updates are eventually reflected without restart. But to force immediate update, the Pod can be restarted. The best answer: The Pod will automatically receive updates after the kubelet syncs (usually within minutes).

So no action is needed, but the Pod may need to be restarted if using subPath. Since the question does not mention subPath, the default behavior is that the mounted ConfigMap is updated automatically. However, the correct answer among options is that the Pod will automatically see the updated data after the kubelet sync period.

27
Matchingmedium

Match each etcd operation to its description.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Store a key-value pair

Retrieve value for a key

Create a backup of the datastore

List all etcd cluster members

Check health of etcd endpoints

Why these pairings

etcd is the key-value store for cluster state; these operations are vital for backup and recovery.

28
Multi-Selectmedium

Which TWO of the following are valid reclaim policies for a PersistentVolume?

Select 2 answers
A.Snapshot
B.Reuse
C.Retain
D.Delete
E.Archive
AnswersC, D

Retain keeps the PV and its data after PVC deletion.

Why this answer

The valid reclaim policies are Retain, Delete, and Recycle (deprecated). Retain retains the PV after PVC deletion, Delete deletes the underlying storage asset, and Recycle (deprecated) performs a basic scrub. So the correct two are Retain and Delete.

29
MCQmedium

A StatefulSet named 'web' uses volumeClaimTemplates to dynamically provision PersistentVolumeClaims for each replica. The cluster runs on AWS with the EBS CSI driver. How many PersistentVolumeClaims will be created if the StatefulSet has 3 replicas and the volumeClaimTemplates specify a single template?

A.9
B.1
C.Depends on the storage class
D.3
AnswerD

Each replica gets its own PVC from the template, so 3 PVCs are created.

Why this answer

volumeClaimTemplates create one PVC per replica, using the template. With 3 replicas, 3 PVCs are created, each bound to its own dynamically provisioned volume.

30
Multi-Selectmedium

Which TWO statements about PersistentVolume (PV) reclaim policies are correct?

Select 2 answers
A.Retain: The PV remains in the cluster and must be manually reclaimed.
B.Retain: The underlying storage asset is automatically deleted.
C.Recycle: The PV is automatically cleaned and made available for a new claim.
D.Delete: The PV must be manually deleted by the administrator.
E.Delete: The PV and the associated storage asset are automatically deleted.
AnswersA, E

Retain keeps the PV; admin must manually delete or reuse it.

Why this answer

Option A is correct because the Retain reclaim policy leaves the PersistentVolume (PV) in the cluster in a 'Released' state after the PersistentVolumeClaim (PVC) is deleted. The underlying storage asset (e.g., an EBS volume or NFS export) is not touched by Kubernetes, and the administrator must manually delete the PV object and then handle the storage asset (e.g., reuse or delete it) outside of Kubernetes.

Exam trap

The trap here is that candidates confuse Retain with automatic cleanup or think Recycle is still a valid, active policy, when in fact it has been deprecated and removed in recent Kubernetes versions.

31
MCQeasy

What is the default reclaim policy for a PersistentVolume?

A.Recycle
B.None
C.Retain
D.Delete
AnswerC

Retain is the default.

Why this answer

The default reclaim policy for a PV is 'Retain', meaning it is not automatically deleted or recycled.

32
Multi-Selecthard

Which THREE of the following are valid ways to provide storage to Pods in Kubernetes?

Select 3 answers
A.Using a ConfigMap volume
B.Using an emptyDir volume
C.Using a PersistentVolumeClaim
D.Using a Secret volume
E.Using a hostPath volume
AnswersB, C, E

emptyDir is a valid temporary storage volume.

Why this answer

B is correct because an emptyDir volume is a simple, ephemeral storage option that is created when a Pod is assigned to a node and exists as long as that Pod is running. It is initially empty and allows containers within the same Pod to share data, making it a valid and commonly used volume type for temporary storage.

Exam trap

The trap here is that candidates often confuse volume types that provide actual storage (like emptyDir, hostPath, and PVCs) with those that are purely for configuration or secrets (ConfigMap and Secret volumes), which are mounted as volumes but are not intended for general-purpose or writable storage.

33
MCQmedium

An administrator runs 'kubectl get pv' and sees a PersistentVolume in 'Released' status. Which of the following is true about this PV?

A.The PV's data is still intact and the PV can be re-claimed.
B.The PV has been deleted from the cluster.
C.The PV is automatically deleted when it becomes Released.
D.The PV is still bound to a PVC.
AnswerA

In Released status, the data is typically still present unless the reclaim policy deletes it. The PV can be manually reclaimed by editing its claimRef.

Why this answer

A Released PV was previously bound to a PVC that has been deleted. The PV's reclaim policy determines what happens next. If the policy is Retain, the PV remains Released and must be manually reclaimed.

If Delete, it will be deleted. Recycle is deprecated.

34
MCQmedium

An administrator creates a PersistentVolume named 'pv-nfs' with a reclaim policy of 'Retain'. After a user deletes the PVC bound to this PV, what state does the PV enter?

A.Available
B.Failed
C.Bound
D.Released
AnswerD

With Retain policy, the PV enters Released state and the data remains.

Why this answer

When the reclaim policy is Retain, the PV remains in Released state after the PVC is deleted. The data is preserved but the PV is not available for reuse until manually reclaimed.

35
MCQhard

A PersistentVolume is created with the following spec: persistentVolumeReclaimPolicy: Retain claimRef: namespace: default name: my-pvc After the PVC 'my-pvc' is deleted, what happens to the PV?

A.The PV enters Released state and must have its claimRef manually removed to be reused
B.The PV is automatically deleted
C.The PV remains Available and can be bound to a new PVC
D.The PV is recycled and its contents are wiped
AnswerA

With Retain, the PV is retained but marked Released. To reuse, the claimRef must be cleared.

Why this answer

Option C is correct: With Retain policy, the PV is not deleted when the PVC is deleted. However, the PV remains in 'Released' state and cannot be bound to a new PVC until the claimRef is manually cleared. Option A is incorrect because the PV does not remain 'Available'.

Option B is incorrect because it is not automatically deleted. Option D is incorrect because the PV is not recycled.

36
MCQeasy

A pod is configured to use a PersistentVolumeClaim (PVC). The PVC is bound to a PersistentVolume (PV) that uses a cloud disk. The pod fails to start with the error 'MountVolume.SetUp failed for volume ... mount failed: exit status 32'. What is the most likely cause?

A.The PV's access mode is ReadOnlyMany
B.The PV is not created
C.The PVC is unbound
D.The underlying storage device is still attached to a previous node
AnswerD

Cloud disks are often attached to one node at a time; detach/re-attach delays cause mount failures.

Why this answer

The error 'MountVolume.SetUp failed for volume ... mount failed: exit status 32' typically indicates a filesystem-level mount failure. When a cloud disk (e.g., AWS EBS, GCE PD) is still attached to a previous node, the new node cannot mount it because the disk is already in use or has a stale filesystem lock. Kubernetes requires the disk to be detached from the old node before it can be attached and mounted on the new node.

Exam trap

The trap here is that candidates often assume the error is due to a missing PV or unbound PVC, but the specific 'exit status 32' points to a low-level mount failure, typically caused by the disk still being attached to a previous node.

How to eliminate wrong answers

Option A is wrong because ReadOnlyMany access mode would not cause a mount failure with exit status 32; it would allow the pod to mount the volume as read-only, and the error would be different (e.g., permission denied). Option B is wrong because if the PV were not created, the PVC would remain unbound and the pod would fail with a different error (e.g., 'persistentvolumeclaim not found') rather than a mount failure. Option C is wrong because an unbound PVC would prevent the pod from scheduling or starting with an error about the PVC not being bound, not a mount failure with exit status 32.

37
MCQmedium

An administrator needs to expand a PersistentVolumeClaim (PVC) that is currently bound to a PersistentVolume (PV). The PV is provisioned by a storage class that supports volume expansion. What must the administrator do to increase the PVC's storage size?

A.Delete the pod that uses the PVC and recreate it with a larger claim.
B.Edit the PV's capacity and then the PVC's capacity.
C.Delete the PVC and recreate it with a larger size.
D.Update the PVC's spec.resources.requests.storage to a larger value.
AnswerD

This triggers expansion if the storage class supports allowVolumeExpansion: true.

Why this answer

To expand a PVC, the administrator only needs to edit the PVC's spec.resources.requests.storage to a larger value. If the storage class supports expansion, the PV will automatically expand. The pod may need to be restarted to see the new size, but the PVC edit is the direct action.

38
MCQmedium

An application requires a persistent volume that can be shared across multiple Pods running on different nodes, with read-write access from all Pods simultaneously. Which access mode should be specified in the PersistentVolumeClaim?

A.ReadWriteOncePod
B.ReadOnlyMany
C.ReadWriteOnce
D.ReadWriteMany
AnswerD

ReadWriteMany allows multiple Pods across nodes to read and write simultaneously.

Why this answer

The correct access mode is ReadWriteMany (RWX), which allows the volume to be mounted as read-write by multiple Pods across different nodes simultaneously. This matches the requirement for shared concurrent read-write access from all Pods.

Exam trap

The trap here is that candidates often confuse ReadWriteMany with ReadWriteOnce, assuming that 'once' means 'one Pod' rather than 'one node', or they forget that ReadOnlyMany does not grant write access despite allowing multi-Pod mounting.

How to eliminate wrong answers

Option A is wrong because ReadWriteOncePod restricts the volume to a single Pod on a single node, preventing sharing. Option B is wrong because ReadOnlyMany allows multiple Pods to mount the volume but only in read-only mode, not read-write. Option C is wrong because ReadWriteOnce allows only a single node to mount the volume as read-write, blocking multi-node sharing.

39
MCQmedium

A user creates a PersistentVolumeClaim with a storage class 'ssd' that does not exist in the cluster. What will happen when the PVC is created?

A.The PVC will be deleted automatically after a timeout.
B.The PVC will be automatically bound to any available PV.
C.The PVC will remain in Pending state.
D.The cluster will create the storage class automatically.
AnswerC

Without a valid storage class, dynamic provisioning cannot occur, and manual PV binding requires a matching class.

Why this answer

If a PVC specifies a storage class that does not exist, it will remain in Pending state because there is no provisioner to dynamically provision a volume. It will not bind to any existing PV unless the PV has the same storage class annotation, but the non-existent class means no dynamic provisioning.

40
MCQeasy

Which kubectl command creates a PersistentVolumeClaim named 'pvc-data' with 1Gi storage access mode ReadWriteOnce?

A.kubectl create pvc pvc-data --size=1Gi --access-mode=RWO
B.kubectl create pvc pvc-data --storage=1Gi --access-mode=ReadWriteOnce
C.kubectl create pvc pvc-data --storage=1Gi --access-mode=ReadWriteOnce
D.kubectl create pv pvc-data --capacity=1Gi --access-mode=ReadWriteOnce
AnswerB

Correct syntax.

Why this answer

The correct command uses 'kubectl create pvc' or 'kubectl apply -f' with a YAML file. Option B uses the imperative command with the correct syntax.

41
MCQhard

A pod is scheduled to a node that has a local SSD mounted at /mnt/ssd. The administrator wants the pod to use this SSD for ephemeral storage that is accessible only while the pod runs on this specific node. Which volume type should be used?

A.hostPath
B.emptyDir
C.configMap
D.secret
AnswerA

hostPath mounts a specific path from the host into the pod, allowing direct access to the SSD.

Why this answer

A hostPath volume mounts a file or directory from the host node's filesystem into the pod. This is suitable for using node-local storage like an SSD, but note it is not portable and ties the pod to the node. emptyDir is ephemeral but uses the pod's default storage (usually disk or tmpfs), not a specific host path. configMap and secret are for configuration data.

42
MCQhard

A CSI driver is installed in the cluster. Which Kubernetes resource is used to register the CSI driver with the kubelet on each node?

A.StorageClass
B.CSIDriver
C.CSINode
D.VolumeAttachment
AnswerB

CSIDriver is the object that provides metadata about the CSI driver to the rest of the cluster.

Why this answer

Option C is correct: CSIDriver is a cluster-level resource that advertises a CSI driver's capabilities and is used by kubelet to discover and interact with the driver. Option A (StorageClass) references a CSI driver but does not register it. Option B (CSINode) is created automatically by the CSI driver's node plugin.

Option D (VolumeAttachment) tracks volume attachments to nodes.

43
MCQeasy

An administrator creates a PersistentVolume with the following YAML: ```yaml apiVersion: v1 kind: PersistentVolume metadata: name: pv-example spec: capacity: storage: 5Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain hostPath: path: /mnt/data ``` Which of the following is true about this PersistentVolume?

A.It can be mounted as read-write by only one node at a time.
B.It can be mounted as read-write by multiple nodes simultaneously.
C.The PV will be automatically deleted when its PVC is released.
D.The PV supports dynamic provisioning.
AnswerA

ReadWriteOnce allows only one node to mount the volume as read-write.

Why this answer

The PV uses 'hostPath', which is typically used for single-node testing and does not support multi-node access. The access mode is ReadWriteOnce (RWO), meaning the volume can be mounted as read-write by a single node. Option A is correct.

44
MCQmedium

A StorageClass named 'fast-ssd' uses the provisioner 'kubernetes.io/gce-pd' and has volumeBindingMode: WaitForFirstConsumer. A PVC 'my-pvc' requests 100Gi storage from this StorageClass. A pod using the PVC is scheduled to a node in zone 'us-central1-a'. When is the PV provisioned?

A.When the pod is scheduled to a node
B.Immediately when the PVC is created
C.When the pod starts running
D.The PV is never provisioned automatically; it must be pre-created
AnswerA

WaitForFirstConsumer delays binding and provisioning until a pod using the PVC is scheduled.

Why this answer

With WaitForFirstConsumer, volume binding and provisioning are delayed until a pod using the PVC is scheduled. The PV is provisioned after the pod is scheduled to a node.

45
MCQmedium

A pod needs to share data between two containers during their lifecycle, but the data does not need to persist after the pod is deleted. Which volume type is most appropriate?

A.emptyDir
B.PersistentVolumeClaim
C.hostPath
D.configMap
AnswerA

emptyDir provides a temporary directory that is shared between containers and deleted with the pod.

Why this answer

Option A is correct: emptyDir volumes are created when a Pod is assigned to a node and exist as long as the Pod is running. They are ideal for sharing data between containers within the same pod and are deleted when the pod is removed. Option B (hostPath) persists on the node.

Option C (configMap) is for configuration data. Option D (PVC) is for persistent storage.

46
MCQmedium

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

A.storageClassName
B.nodeAffinity
C.capacity
D.persistentVolumeReclaimPolicy
AnswerC

capacity is required to define the size of the PV.

Why this answer

A PV must specify its capacity (storage amount). Other fields like accessModes are also required, but capacity is one of them.

47
MCQhard

You have a PVC that is bound to a PV with a filesystem volume mode. You want to use the volume as a block device in a pod. What should you do?

A.Use a hostPath volume instead.
B.Set volumeDevices in the pod spec instead of volumeMounts.
C.Create a new PVC with volumeMode: Block and bind it to a new PV.
D.Modify the PV's volumeMode to Block.
AnswerC

You need to create a new PVC with Block mode and a corresponding PV.

Why this answer

To use a volume as a block device, the PV and PVC must be created with volumeMode: Block. You cannot change the mode after creation; you must create a new PVC with the correct mode.

48
Multi-Selectmedium

Which TWO of the following volume types are typically used for sharing data between containers in the same pod?

Select 2 answers
A.configMap
B.hostPath
C.emptyDir
D.nfs
E.secret
AnswersB, C

hostPath can be used for sharing data between containers on the same node, but is less common.

Why this answer

emptyDir and hostPath can be used for sharing data between containers in a pod. ConfigMap and Secret are for configuration, not general data sharing. NFS is a network volume typically used across pods.

49
Multi-Selectmedium

Which TWO of the following are valid access modes for a PersistentVolume in Kubernetes? (Select two.)

Select 2 answers
A.WriteMany
B.ReadOnlySingle
C.ReadWriteOnce
D.ReadWriteMany
E.ReadWriteOncePerNode
AnswersC, D

RWO allows a single node to mount the volume in read-write mode.

Why this answer

ReadWriteOnce (RWO) and ReadWriteMany (RWX) are standard access modes. ReadWriteOncePod (RWOP) is also valid but not listed here. The other options are not valid access modes.

50
MCQmedium

Which of the following volume types provides ephemeral storage that shares the pod's lifecycle and is initially empty?

A.secret
B.emptyDir
C.configMap
D.hostPath
AnswerB

emptyDir is ephemeral and starts empty.

Why this answer

emptyDir volumes are created when a pod is assigned to a node and exist as long as the pod runs. They start empty.

51
MCQhard

A company is migrating a stateful application to Kubernetes. The application requires persistent storage that is 'zone-aware' to survive a single zone failure and must provide the highest possible I/O performance. Which storage solution best meets these requirements?

A.Use a network filesystem (NFS) server running as a single pod with a PersistentVolume backed by a regional Persistent Disk
B.Create a StorageClass with WaitForFirstConsumer binding and volumeBindingMode: WaitForFirstConsumer
C.Use a StorageClass that provisions regional Persistent Disks with replication across two zones
D.Deploy a StatefulSet with a local SSD on each node and use a DaemonSet to manage replication
AnswerC

Regional PDs provide zone redundancy and high performance, meeting both requirements.

Why this answer

Option C is correct because regional Persistent Disks replicate data synchronously across two zones, providing zone-level fault tolerance while maintaining high I/O performance due to direct block storage access. This meets the requirement for surviving a single zone failure without the overhead of network filesystem protocols or application-level replication.

Exam trap

The trap here is that candidates often confuse 'zone-aware' with simply scheduling pods across zones (Option B) or assume that any replicated storage (Option A) meets the requirement, but fail to recognize that only synchronous block-level replication across zones provides both fault tolerance and high I/O performance.

How to eliminate wrong answers

Option A is wrong because a single-pod NFS server creates a single point of failure and introduces network filesystem latency, which cannot survive a zone failure or provide the highest possible I/O performance. Option B is wrong because WaitForFirstConsumer binding mode only delays volume provisioning until a pod is scheduled; it does not provide zone-level replication or fault tolerance. Option D is wrong because local SSDs are node-bound and cannot survive a zone failure without external replication, and a DaemonSet managing replication adds complexity and performance overhead that does not guarantee synchronous replication across zones.

52
MCQmedium

A team is designing a storage solution for a Cassandra cluster on Kubernetes. Each pod must have its own dedicated storage, and the cluster must be able to scale up and down dynamically. Which Kubernetes resource should be used to manage the storage?

A.ReplicaSet with emptyDir volumes
B.DaemonSet with hostPath volumes
C.StatefulSet with a volumeClaimTemplate
D.Deployment with a single PersistentVolume shared by all pods
AnswerC

This creates a unique PVC for each pod, providing dedicated storage.

Why this answer

StatefulSet is the correct choice because it provides stable, unique network identities and dedicated storage for each pod via a volumeClaimTemplate. This ensures each Cassandra pod gets its own PersistentVolume, which is essential for stateful applications that require data persistence and ordered scaling. The volumeClaimTemplate automatically provisions a unique PersistentVolumeClaim for each replica, enabling dynamic scaling up and down while preserving data integrity.

Exam trap

The trap here is that candidates often choose Deployment with a shared PersistentVolume, mistakenly thinking it simplifies management, but they overlook the need for dedicated, persistent storage per pod and the ordered scaling guarantees that only StatefulSet provides.

How to eliminate wrong answers

Option A is wrong because emptyDir volumes are ephemeral and tied to the pod's lifecycle; data is lost when the pod is deleted, making it unsuitable for a Cassandra cluster that requires persistent storage. Option B is wrong because hostPath volumes bind to a specific node's filesystem, which prevents dynamic scaling and can cause data inconsistency if pods are rescheduled to different nodes; DaemonSets also run one pod per node, not suitable for a scalable Cassandra cluster. Option D is wrong because a single PersistentVolume shared by all pods would create a single point of failure and contention, violating the requirement for each pod to have its own dedicated storage; Deployments also do not guarantee stable pod identities or ordered scaling needed for stateful applications.

53
MCQeasy

You are a cluster administrator managing a production Kubernetes cluster that hosts a stateful application using StatefulSets with PersistentVolumeClaims (PVCs) backed by a cloud provider's persistent disk. A developer reports that a new pod in the StatefulSet is stuck in 'Pending' state. You describe the StatefulSet and see that it has 3 replicas. Two pods are Running, but the third pod (pod-2) is Pending. You check the PVC for pod-2 and see it is 'Pending'. The StorageClass uses 'WaitForFirstConsumer' volume binding mode. The node where pod-2 should run has sufficient resources. Other PVCs in the same namespace bound successfully. What is the most likely cause of the pending PVC and pod?

A.The PV that should bind to the PVC has a nodeAffinity that does not match any available node.
B.The CSI driver is not installed on the node where pod-2 is scheduled.
C.The PVC's requested storage size exceeds the available capacity in the cloud provider's quota.
D.The PVC's access mode is ReadWriteOnce, but the pod requires ReadWriteMany.
AnswerA

With WaitForFirstConsumer, after scheduling, a PV is provisioned or selected; if its nodeAffinity doesn't match the node, the pod remains pending.

Why this answer

The correct answer is A because with 'WaitForFirstConsumer' volume binding mode, the PVC binding is deferred until a pod using it is scheduled. The PV that should bind to the PVC has a nodeAffinity that does not match any available node, preventing the scheduler from binding the PVC and scheduling the pod. This results in both the PVC and pod remaining in 'Pending' state, even though the node has sufficient resources.

Exam trap

The trap here is that candidates often assume a Pending PVC is always due to insufficient storage capacity or quota, ignoring the impact of volume binding modes and nodeAffinity constraints on scheduling.

How to eliminate wrong answers

Option B is wrong because the CSI driver must be installed on all nodes that can run pods using the CSI driver; if it were missing on the scheduled node, the pod would fail with a different error (e.g., 'FailedMount'), not remain Pending due to an unbounded PVC. Option C is wrong because if the requested storage size exceeded the cloud provider's quota, the PVC would likely fail with a specific error (e.g., 'ProvisioningFailed') rather than remain Pending, and other PVCs in the same namespace bound successfully, indicating quota is not the issue. Option D is wrong because ReadWriteOnce is the default access mode for most cloud persistent disks and is compatible with StatefulSet pods; ReadWriteMany would be required only if multiple pods need to write simultaneously to the same volume, which is not the case here.

54
Multi-Selecteasy

Which TWO statements about PersistentVolume (PV) and PersistentVolumeClaim (PVC) binding are correct?

Select 1 answer
A.A PVC can be bound to a PV that has been released and is pending reclamation
B.A PV can be bound to multiple PVCs simultaneously if it has ReadWriteMany access mode
C.A PVC will remain in Pending state if no PV matches its storage request and no StorageClass is defined
D.A PV can only be bound to a PVC that requests exactly the same amount of storage
E.A PVC can be bound to a PV with a different access mode if the PV supports multiple modes
AnswersC

Without a matching PV or dynamic provisioning, the PVC cannot be bound.

Why this answer

Option C is correct because a PersistentVolumeClaim (PVC) will remain in the Pending state if no PersistentVolume (PV) matches its storage request and no StorageClass is defined to dynamically provision a volume. Without a matching PV or a StorageClass, the Kubernetes scheduler cannot bind or create a volume for the claim, leaving it pending indefinitely until a suitable PV becomes available or a StorageClass is added.

Exam trap

CNCF often tests the misconception that a PVC can bind to a PV with a different access mode if the PV supports multiple modes, but in reality, the access mode must match exactly between the PVC's request and one of the PV's supported modes for the binding to succeed.

55
Multi-Selecthard

Which THREE of the following are valid ways to provide storage to a pod in Kubernetes? (Select three.)

Select 3 answers
A.hostPath
B.emptyDir
C.secret
D.PersistentVolumeClaim
E.configMap
AnswersA, B, D

hostPath mounts a file or directory from the host node's filesystem.

Why this answer

PersistentVolumeClaim, emptyDir, and hostPath are all valid volume sources. configMap and secret are also valid, but they are for configuration data, not general storage. However, the question asks for 'storage' broadly. Typically, these are considered storage options.

But to align with common exam topics, I'll include configMap as a valid volume type. Actually, configMap is a volume type that provides configuration data, not general storage. I'll adjust: correct answers are PVC, emptyDir, hostPath.

ConfigMap and secret are also volume types, but they are for specific purposes. I'll stick with PVC, emptyDir, hostPath as the most direct storage options.

56
MCQeasy

Which reclaim policy will cause the underlying storage to be deleted when the associated PersistentVolume is released from a PersistentVolumeClaim?

A.Delete
B.Recycle
C.Retain
D.Archive
AnswerA

Delete removes the PV and the associated storage asset from the external infrastructure.

Why this answer

The Delete reclaim policy causes the PV and its associated storage asset to be deleted upon release. Retain keeps the data, Recycle (deprecated) used to scrub and re-use.

57
MCQeasy

Which of the following commands will list all PersistentVolumeClaims in a cluster?

A.kubectl get pv
B.kubectl get pvc
C.kubectl get claims
D.kubectl get persistentvolumeclaims
AnswerB, D

This lists PVCs in the current namespace.

Why this answer

'kubectl get pvc' lists PVCs across all namespaces if no namespace flag is given, but it defaults to the current namespace. To list all namespaces, use --all-namespaces. The correct answer is B as it lists PVCs in the current namespace, which is a common way.

58
Multi-Selecthard

Which THREE of the following are true about expanding a PersistentVolumeClaim?

Select 3 answers
A.After expanding the PVC, the pod must be recreated for the new size to take effect.
B.You can reduce the size of a PVC after creation.
C.The StorageClass must have allowVolumeExpansion: true.
D.The volume plugin must support expansion.
E.You can expand a PVC by editing its spec.resources.requests.storage field.
AnswersC, D, E

This is required for PVC expansion.

Why this answer

Expanding a PVC requires the StorageClass to have allowVolumeExpansion: true. The PVC can be edited to request more storage, but only if the underlying volume plugin supports expansion. After expansion, the filesystem may need to be resized.

59
Matchingmedium

Match each cluster upgrade step to its purpose.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Update the cluster bootstrap tool

Update the node agent

Evict Pods gracefully before upgrade

Update API server, scheduler, controller-manager

Allow Pods to be scheduled again after upgrade

Why these pairings

Upgrading a cluster follows a specific order to maintain availability.

60
MCQeasy

Which access mode allows multiple pods running on different nodes to read from and write to a PersistentVolume at the same time?

A.ReadOnlyMany
B.ReadWriteMany
C.ReadWriteOnce
D.ReadWriteOncePod
AnswerB

RWX allows multiple nodes to mount with read-write access.

Why this answer

Option C is correct: ReadWriteMany (RWX) allows multiple nodes to mount the volume with read-write access. Option A (RWO) allows only one node. Option B (ROX) is read-only for many nodes.

Option D (RWOP) is for a single pod, not multiple nodes.

61
MCQmedium

A cluster administrator wants to expand an existing PersistentVolumeClaim (PVC) that is bound to a PersistentVolume (PV) with reclaim policy Delete and storage class 'fast'. The PV was dynamically provisioned. Which condition is required for the PVC expansion to succeed?

A.The PV must be in Released state.
B.The StorageClass 'fast' must have allowVolumeExpansion: true.
C.The reclaim policy must be changed to Retain before expansion.
D.The PVC must be using access mode ReadWriteOnce.
AnswerB

allowVolumeExpansion must be enabled in the StorageClass to allow resizing of PVCs provisioned by that class.

Why this answer

PVC expansion requires that the StorageClass has allowVolumeExpansion: true. The PV's reclaim policy does not affect expansion. The PVC must also be in Bound state and the access mode supports expansion.

So the correct answer is that the StorageClass 'fast' must have allowVolumeExpansion: true.

62
Multi-Selectmedium

Which THREE of the following are valid ways to provide storage to a pod in Kubernetes?

Select 3 answers
A.hostPath
B.emptyDir
C.AWS Elastic Block Store (EBS) directly
D.Docker volume
E.PersistentVolumeClaim
AnswersA, B, E

hostPath mounts a file or directory from the host node's filesystem into the pod.

Why this answer

A is correct because `hostPath` mounts a file or directory from the host node's filesystem into a pod, allowing the pod to access persistent data stored on the node. This is a valid Kubernetes volume type defined in the PodSpec, commonly used for accessing host-level logs or configuration files, though it lacks portability across nodes.

Exam trap

The trap here is that candidates may confuse Docker volumes (a legacy container runtime concept) with Kubernetes volumes, or assume cloud provider storage like EBS can be directly specified in a pod definition without a PVC or CSI driver.

63
MCQmedium

A pod uses a PVC with access mode RWO. The pod is scheduled on node A. You want to schedule another pod on node B that uses the same PVC. What will happen?

A.The second pod will be stuck in ContainerCreating state until the first pod releases the volume
B.Both pods will mount the volume and share it without issues
C.The second pod will successfully mount the volume as read-only
D.The first pod will be evicted to allow the second pod to use the volume
AnswerA

The volume cannot be attached to two nodes simultaneously with RWO. The second pod will wait indefinitely or fail.

Why this answer

RWO allows only one node to mount the volume as read-write. If a second pod on a different node tries to use the same PVC, it will fail because the volume is already attached to node A.

64
Multi-Selectmedium

Which THREE statements about PersistentVolumeClaims (PVCs) are correct?

Select 3 answers
A.A PVC defines the reclaim policy for the underlying PersistentVolume.
B.A PVC binds to a PersistentVolume that satisfies its storage request and access modes.
C.A PVC can request storage expansion if the StorageClass allows it.
D.A PVC is a cluster-scoped resource.
E.A PVC can be mounted by multiple Pods if it is bound to a PV with ReadWriteMany access mode.
AnswersB, C, E

PVC binding requires matching capacity and access modes.

Why this answer

PVCs request storage from PVs (A). PVCs can be used by pods once bound (B). PVCs can be expanded if the StorageClass allows (D).

PVCs do not define the reclaim policy (that's on PV) (C), and PVCs are namespaced resources (E is false).

65
MCQmedium

A DevOps team needs to provide persistent storage to a set of pods that all require read-write access to the same data simultaneously. Which volume type should they use?

A.PersistentVolumeClaim with ReadWriteMany
B.hostPath
C.emptyDir
D.PersistentVolumeClaim with ReadWriteOnce
AnswerA

ReadWriteMany allows multiple pods to read and write simultaneously, which is required here.

Why this answer

A PersistentVolumeClaim with ReadWriteMany (RWX) is the correct choice because it allows multiple pods to mount the same volume simultaneously with read-write access. This access mode is supported by network-based storage backends like NFS, GlusterFS, or CephFS, which provide the necessary concurrency controls for shared access across pods.

Exam trap

The trap here is that candidates often confuse ReadWriteOnce (RWO) with multi-pod access, forgetting that RWO explicitly limits the volume to a single pod mount, while ReadWriteMany (RWX) is required for simultaneous shared access.

How to eliminate wrong answers

Option B (hostPath) is wrong because it mounts a directory from the host node's filesystem into the pod, which does not support simultaneous read-write access from pods running on different nodes; it is also not portable and poses security risks. Option C (emptyDir) is wrong because its lifecycle is tied to the pod — data is deleted when the pod is removed, and it cannot be shared across pods on different nodes. Option D (PersistentVolumeClaim with ReadWriteOnce) is wrong because ReadWriteOnce (RWO) restricts the volume to be mounted as read-write by a single pod on a single node, making it unsuitable for multi-pod shared access.

66
Drag & Dropmedium

Drag and drop the steps to configure a NetworkPolicy that allows ingress traffic from a specific pod into the correct order.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order

Why this order

First ensure the namespace exists, then define the policy with podSelector and ingress from specific pods, apply, and test.

67
MCQhard

A cluster has a CSI driver installed. A pod using a CSI volume is in CrashLoopBackOff. 'kubectl describe pod' shows: 'failed to mount volume: rpc error: code = DeadlineExceeded desc = context deadline exceeded'. What is the MOST likely cause?

A.The CSI driver is failing to respond in time.
B.The PVC is not bound.
C.The CSI driver is not installed.
D.The volume mode is Block but the pod expects Filesystem.
AnswerA

The error indicates a timeout, meaning the driver did not complete the mount operation within the deadline.

Why this answer

A DeadlineExceeded error from the CSI driver indicates that the mount operation timed out, possibly due to network issues or driver unavailability.

68
MCQeasy

A pod is unable to start because the PersistentVolumeClaim it references is still in 'Pending' state. What is the most likely cause?

A.The PersistentVolumeClaim's storage class does not exist or cannot provision a volume
B.The pod's YAML has a syntax error
C.The pod is using a hostPath volume
D.The node has insufficient CPU resources
AnswerA

If the StorageClass is missing or misconfigured, the PVC will stay Pending.

Why this answer

A PersistentVolumeClaim (PVC) remains in 'Pending' state when it cannot find a suitable PersistentVolume (PV) to bind to or when its storage class cannot dynamically provision one. The most common cause is that the referenced storage class does not exist, is misspelled, or lacks a provisioner that can create the volume, leaving the PVC unbound and the pod unable to start.

Exam trap

The trap here is that candidates often confuse 'Pending' state for a PVC with pod scheduling issues, thinking it is a resource constraint on the node, rather than recognizing it as a storage binding or provisioning failure.

How to eliminate wrong answers

Option B is wrong because a YAML syntax error would typically prevent the pod from being created at all, not cause the PVC to remain in 'Pending' state; the pod would fail with a validation error. Option C is wrong because using a hostPath volume does not involve a PVC, so it would not cause a PVC to be stuck in 'Pending'; the pod would start directly if the host path exists. Option D is wrong because insufficient CPU resources on a node would result in the pod being in 'Pending' state due to resource scheduling issues, not because of a PVC being in 'Pending'; the pod would show a different reason such as 'Unschedulable'.

69
MCQeasy

Which access mode allows multiple pods to read and write to a PersistentVolume simultaneously when all pods are on the same node?

A.ReadWriteOnce
B.ReadOnlyMany
C.ReadWriteMany
D.ReadWriteOncePod
AnswerA

ReadWriteOnce allows a single node to mount the volume read-write. When multiple pods are scheduled on that same node, they can all read and write simultaneously.

Why this answer

RWO (ReadWriteOncePod) is not a valid access mode. ReadWriteOnce (RWO) allows only one node to mount the volume read-write. ReadOnlyMany (ROX) allows multiple nodes to mount read-only.

ReadWriteMany (RWX) allows multiple nodes to mount read-write. However, if all pods are on the same node, ReadWriteOnce (RWO) allows multiple pods on that node to read and write simultaneously.

70
MCQeasy

Which volume type in Kubernetes allows a Pod to share data between its containers, with the data being deleted when the Pod is removed?

A.hostPath
B.emptyDir
C.configMap
D.secret
AnswerB

emptyDir is created when the Pod is assigned to a node and exists as long as that Pod is running. It is used for sharing data between containers and is deleted when the Pod is removed.

Why this answer

emptyDir volumes are created when a Pod is assigned to a node and exist as long as that Pod is running. They are initially empty and allow containers in the same Pod to share data. When the Pod is deleted, the emptyDir is deleted permanently. hostPath persists beyond Pod lifecycle, configMap and secret are used for configuration data, not for sharing data between containers in a transient manner.

71
Multi-Selectmedium

Which TWO statements about PersistentVolume (PV) reclaim policies are correct?

Select 2 answers
A.Delete policy: both the PV and the underlying storage are deleted.
B.Recycle policy: the PV is deleted and data is scrubbed.
C.Delete policy: the PV remains but the underlying storage is deleted.
D.Retain policy: the PV remains in the cluster and the underlying storage is not deleted.
E.Retain policy: the PV is automatically deleted after 30 days.
AnswersA, D

Delete removes both the cluster resource and external storage.

Why this answer

Option A is correct because the Delete reclaim policy removes both the PersistentVolume object from the cluster and the associated underlying storage asset (e.g., an EBS volume or GCE PD). This is the default behavior for dynamically provisioned PVs, ensuring no orphaned storage resources remain after the PV is released.

Exam trap

The trap here is confusing the Recycle policy with Delete or Retain, or assuming that Retain includes an automatic cleanup timer, when in fact Retain requires manual administrative action and never auto-deletes.

72
MCQmedium

A pod is using a PersistentVolumeClaim (PVC) named 'mypvc' which is bound to a PersistentVolume (PV) with reclaim policy 'Retain'. The pod is deleted and then the PVC is deleted. What happens to the PV?

A.The PV remains but is in 'Released' state.
B.The PV is automatically deleted.
C.The PV is immediately bound to another PVC.
D.The PV is recycled for reuse.
AnswerA

With 'Retain', the PV is not deleted or recycled; it stays in 'Released' state and retains data.

Why this answer

With reclaim policy 'Retain', the PV is not deleted or recycled after the PVC is deleted. It remains in the 'Released' state, and its data persists for manual reclamation.

73
MCQhard

A cluster has a PersistentVolumeClaim (PVC) named 'data-claim' bound to a PersistentVolume (PV) with reclaim policy 'Retain'. The PVC is deleted. The PV now shows status 'Released'. What must be done so that the PV can be reused by a new PVC?

A.Nothing; the PV will automatically become Available after some time.
B.Delete and recreate the PersistentVolume.
C.Create a new PVC with the same name.
D.Change the reclaim policy to Delete.
AnswerB

Deleting and recreating the PV will make it available for new claims. Alternatively, you can edit the PV to remove the claimRef and change status to Available, but deletion and recreation is straightforward.

Why this answer

When a PV with Retain policy is released (PVC deleted), it remains in Released state and cannot be bound to another PVC automatically. The administrator must manually delete the PV and recreate it, or delete the claimRef to make it Available again. The correct steps: delete the PV and then recreate it with the same spec, or manually edit the PV to remove the claimRef and change status to Available.

74
MCQmedium

A StatefulSet named 'web' uses volumeClaimTemplates to dynamically provision PVCs. After updating the StatefulSet to increase the storage request from 1Gi to 5Gi, the existing pods' PVCs still show 1Gi. What is the most likely reason?

A.volumeClaimTemplates only apply when a new pod is created; existing PVCs are not modified
B.Expanding PVCs is not supported by StatefulSets
C.The StorageClass must have allowVolumeExpansion set to true
D.The StatefulSet must be deleted and recreated to apply changes
AnswerA

The volumeClaimTemplate is used to create new PVCs. Existing PVCs are not updated automatically.

Why this answer

Option A is correct: volumeClaimTemplates are only used during pod creation; existing PVCs are not updated. Option B is false because StatefulSet does not automatically recreate pods just because the template changed. Option C is not a requirement for StatefulSets.

Option D is incorrect because expansion is possible.

75
MCQeasy

Which resource type is used to define a template for dynamically provisioning PersistentVolumes?

A.PersistentVolume
B.VolumeAttachment
C.StorageClass
D.PersistentVolumeClaim
AnswerC

StorageClass contains the provisioner and parameters for dynamic provisioning.

Why this answer

StorageClass defines a provisioner and parameters for dynamically provisioning PVs.

Page 1 of 2 · 114 questions totalNext →

Ready to test yourself?

Try a timed practice session using only Cka Storage questions.