Kubernetes MCQs – Storage Management

11.) Can a single pod use multiple volumes?

A) No
B) Yes
C) Only for StatefulSets
D) Only in DaemonSets

Answer: Option B

Explanation: Pods can mount multiple volumes as needed for various purposes.

12.) Which object defines the provisioner used for dynamic storage allocation?

A) PV
B) PVC
C) StorageClass
D) Pod

Answer: Option C

Explanation: StorageClass includes the provisioner type like AWS EBS, GCE PD, etc.

13.) Which volume type allows sharing data between containers in the same pod?

A) emptyDir
B) hostPath
C) configMap
D) secret

Answer: Option A

Explanation: emptyDir volumes are shared between all containers in the same pod.

14.) What happens to an emptyDir volume when a pod is deleted?

A) Data is retained
B) Data is backed up
C) Volume persists
D) Data is deleted

Answer: Option D

Explanation: emptyDir volumes exist as long as the pod exists and are deleted when the pod is removed.

15.) What is the use of hostPath volume?

A) Persistent multi-node access
B) Mounting a node’s directory into a pod
C) Cloud storage integration
D) Mounting from remote servers

Answer: Option B

Explanation: hostPath mounts a file or directory from the host node into the pod.

16.) Which of these is NOT a valid Kubernetes volume type?

A) gcsBucket
B) azureDisk
C) awsElasticBlockStore
D) nfs

Answer: Option A

Explanation: There’s no direct gcsBucket volume type in Kubernetes.

17.) What is a CSI driver?

A) Container Storage Interface
B) Cloud Storage Integrator
C) Container Side Interface
D) Cluster Storage Integrator

Answer: Option A

Explanation: CSI standardizes storage driver development for container orchestrators like Kubernetes.

18.) What command is used to create a PVC from a YAML manifest file named pvc.yaml?

A) kubectl apply -f pvc.yaml
B) kubectl create volume pvc.yaml
C) kubectl deploy pvc.yaml
D) kubectl run pvc.yaml

Answer: Option A

Explanation: The kubectl apply -f command is used to create or update Kubernetes resources from a manifest file.

19.) What is a limitation of using hostPath volumes?

A) Only available in cloud
B) No dynamic provisioning
C) Only supports Windows
D) Tightly coupled to node

Answer: Option D

Explanation: Pods with hostPath must run on the same node due to host dependency.

20.) What is the key benefit of using StorageClass?

A) Monitoring volumes
B) Automating pod restarts
C) Managing namespaces
D) Enabling dynamic provisioning of storage

Answer: Option D

Explanation: StorageClass defines how PVs are dynamically created on demand.

Leave a Reply

Your email address will not be published. Required fields are marked *