Kubernetes MCQs – Storage Management

21.) What happens when a PVC is deleted and its PV has a reclaim policy of Delete?

A) The PV is retained
B) The PV is reused
C) The PV and underlying storage are deleted
D) An error is raised

Answer: Option C

Explanation: The volume and associated data are removed when reclaim policy is Delete.

22.) Which type of volume would you use to mount a remote NFS server?

A) emptyDir
B) nfs
C) awsElasticBlockStore
D) configMap

Answer: Option B

Explanation: nfs volumes allow mounting remote directories via the NFS protocol.

23.) Can a PVC specify which StorageClass to use?

A) No
B) Yes, via storageClassName
C) Only for StatefulSets
D) Only in Minikube

Answer: Option B

Explanation: The storageClassName field lets the PVC specify the desired StorageClass.

24.) How do you manually edit a PVC named data-claim to change the requested storage size?

A) kubectl update pvc data-claim
B) kubectl edit pvc data-claim
C) kubectl resize pvc data-claim
D) kubectl modify pvc data-claim

Answer: Option B

Explanation: The kubectl edit command opens the PVC in an editor where you can modify the requested storage size (if supported by the StorageClass).

25.) Which of the following is a temporary volume type?

A) configMap
B) persistentVolume
C) emptyDir
D) azureDisk

Answer: Option C

Explanation: emptyDir volumes are erased when the pod is deleted.

26.) What file system permissions are applied by default to mounted volumes?

A) 0777
B) 0644
C) 0700
D) Depends on volume type and securityContext

Answer: Option D

Explanation: Permissions vary and can be modified using the pod’s securityContext.

27.) What does ReadOnlyMany access mode mean?

A) Mounted by one pod only
B) Mounted read/write by many pods
C) Mounted as read-only by multiple pods
D) Mounted on a single node

Answer: Option C

Explanation: Allows many pods to read a volume, but not write.

28.) Which command is used to view all Persistent Volumes in a Kubernetes cluster?

A) kubectl describe pv
B) kubectl get pv
C) kubectl show volumes
D) kubectl list persistentvolumes

Answer: Option B

Explanation: This command lists all Persistent Volumes (PVs) in the cluster with their statuses and capacities.

29.) What command would you use to view the details of a specific Persistent Volume Claim named my-pvc?

A) kubectl logs my-pvc
B) kubectl get pvc my-pvc
C) kubectl describe pvc my-pvc
D) kubectl info pvc my-pvc

Answer: Option C

Explanation: The kubectl describe command provides detailed information about the my-pvc claim including events, status, and volume binding.

30.) Which command shows all StorageClasses available in the cluster?

A) kubectl get storage
B) kubectl get sc
C) kubectl describe storageclasses
D) kubectl get storageclass

Answer: Option B

Explanation: sc is the short name for StorageClass, and kubectl get sc lists all available storage classes.

Kubernetes MCQs, Configuration Management

Leave a Reply

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