Kubernetes MCQ Banner

Kubernetes Multiple Choice Questions (MCQs) and Answers

Master Kubernetes with Practice MCQs. Explore our curated collection of Multiple Choice Questions. Ideal for placement and interview preparation, our questions range from basic to advanced, ensuring comprehensive coverage of Kubernetes concepts. Begin your placement preparation journey now!

Q61

Q61 How do you create a PersistentVolumeClaim using a YAML file?

A

kubectl apply -f

B

kubectl create pvc

C

kubectl set pvc

D

kubectl describe pvc

Q62

Q62 Which field in a PV spec specifies the storage backend type?

A

spec.storageClass

B

spec.backendType

C

spec.volumeMode

D

spec.persistentVolumeReclaimPolicy

Q63

Q63 How do you bind a PVC to a specific PV?

A

By matching labels

B

By using a selector

C

By referencing PV name

D

It happens automatically

Q64

Q64 A PVC is not bound to any PV. What might be the issue?

A

Mismatched labels

B

Cluster is down

C

Insufficient storage

D

PV is corrupted

Q65

Q65 A pod using a PersistentVolume is stuck in "ContainerCreating" state. What could be wrong?

A

Missing PVC

B

Node not ready

C

Pod labels missing

D

Incorrect pod spec

Q66

Q66 A pod cannot write to a PersistentVolume. What could resolve the issue?

A

Check access mode

B

Restart pod

C

Recreate PVC

D

Increase PV size

Q67

Q67 What is the main purpose of Kubernetes Volumes?

A

To manage pod lifecycle

B

To provide storage to containers

C

To scale pods

D

To monitor logs

Q68

Q68 How is a PersistentVolume different from a Volume?

A

PVs are temporary

B

PVs are for persistent storage

C

PVs are pod-specific

D

PVs are immutable

Q69

Q69 Which access mode allows multiple nodes to read and write to a volume?

A

ReadWriteOnce

B

ReadOnlyMany

C

ReadWriteMany

D

ReadOnlyOnce

Q70

Q70 What happens to a PersistentVolume after its associated PVC is deleted?

A

It is released

B

It is retained

C

It is deleted

D

It is reallocated

Q71

Q71 What is the default reclaim policy for dynamically provisioned PersistentVolumes?

A

Retain

B

Recycle

C

Delete

D

None

Q72

Q72 Which command lists all PersistentVolumes in the cluster?

A

kubectl get pv

B

kubectl get pvc

C

kubectl get volumes

D

kubectl list pv

Q73

Q73 How do you create a PersistentVolume using a YAML file?

A

kubectl apply -f

B

kubectl create volume

C

kubectl set pv

D

kubectl describe volume

Q74

Q74 How do you dynamically provision a PersistentVolumeClaim?

A

Specify a StorageClass

B

Specify a volume type

C

Set reclaim policy

D

Use volume labels

Q75

Q75 How do you bind a PersistentVolumeClaim to a specific volume using YAML?

A

Use volume labels

B

Set volumeName in PVC

C

Use accessModes

D

Set reclaim policy

Q76

Q76 A pod cannot access a volume mounted as ReadWriteOnce. What could be the issue?

A

Incorrect labels

B

Volume already in use

C

Pod is down

D

PVC is missing

Q77

Q77 A PersistentVolumeClaim is bound, but the pod cannot mount the volume. What could be wrong?

A

Incorrect access mode

B

Volume deleted

C

Pod spec incorrect

D

PVC is corrupted

Q78

Q78 A PersistentVolume remains in Released state. What can resolve this issue?

A

Delete and recreate PV

B

Recycle PV

C

Manually reclaim

D

Change access mode

Q79

Q79 What is the primary role of the Kubernetes scheduler?

A

To create pods

B

To delete nodes

C

To assign pods to nodes

D

To manage secrets

Q80

Q80 Which factors does the Kubernetes scheduler consider when assigning pods to nodes?

A

Node health

B

Resource requests

C

Affinity rules

D

All of the above

Q81

Q81 What is the purpose of taints and tolerations in Kubernetes scheduling?

A

To prevent pod eviction

B

To manage storage

C

To influence pod placement

D

To delete nodes

Q82

Q82 What happens if no suitable node is found for a pod during scheduling?

A

Pod is deleted

B

Pod remains unscheduled

C

Pod is rescheduled

D

Pod is terminated

Q83

Q83 How do node affinity rules affect pod scheduling?

A

Enforce specific node placement

B

Ignore resource constraints

C

Override taints

D

Evict pods

Q84

Q84 Which field in a pod spec is used to define nodeSelector for scheduling?

A

spec.selector

B

spec.nodeName

C

spec.nodeSelector

D

spec.schedulingPolicy

Q85

Q85 How do you define a taint on a node?

A

kubectl set taint

B

kubectl apply taint

C

kubectl taint node

D

kubectl label taint

Q86

Q86 How do you specify pod tolerations in a YAML file?

A

spec.tolerations

B

spec.affinity

C

spec.taints

D

spec.schedulingPolicy

Q87

Q87 A pod remains in Pending state due to scheduling issues. What might be the cause?

A

No suitable nodes

B

Pod crash

C

Node labels missing

D

Kubelet not ready

Q88

Q88 A node has a taint, but pods are being scheduled on it. What could be wrong?

A

Taint misconfigured

B

Pods lack tolerations

C

Taint expired

D

Node selector overridden

Q89

Q89 A pod is incorrectly scheduled on a node. What could resolve the issue?

A

Add a taint

B

Update node affinity

C

Recreate pod

D

Add resource limits

Q90

Q90 What is the purpose of Kubernetes monitoring?

A

To scale pods

B

To ensure cluster health

C

To deploy applications

D

To manage PVCs

ad verticalad vertical
ad