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!

Q1

Q1 What is the main function of Kubernetes?

A

Orchestrating containers

B

Writing apps

C

Storing data

D

Serving static websites

Q2

Q2 Which company originally developed Kubernetes?

A

Microsoft

B

Google

C

Amazon

D

IBM

Q3

Q3 What is a Kubernetes cluster?

A

A group of containers

B

A set of nodes working together

C

A single database

D

A network tool

Q4

Q4 What is the smallest deployable unit in Kubernetes?

A

Node

B

Pod

C

Cluster

D

Service

Q5

Q5 What is the purpose of the kube-scheduler component?

A

Managing pods

B

Assigning pods to nodes

C

Monitoring nodes

D

Storing cluster data

Q6

Q6 How does Kubernetes ensure high availability?

A

By replicating nodes

B

By using Load Balancers

C

By scaling pods

D

All of the above

Q7

Q7 What is the role of the etcd component in Kubernetes?

A

Managing logs

B

Storing cluster state

C

Monitoring nodes

D

Assigning IPs

Q8

Q8 Which command is used to get all namespaces in a cluster?

A

kubectl get pods

B

kubectl get namespaces

C

kubectl describe pods

D

kubectl list namespaces

Q9

Q9 A Kubernetes pod is "CrashLoopBackOff". What could be the reason?

A

Misconfigured image

B

Lack of CPU

C

Incorrect port

D

Unreachable node

Q10

Q10 Which component in Kubernetes serves as the cluster's brain?

A

Kubelet

B

Kube-proxy

C

Kube-apiserver

D

Scheduler

Q11

Q11 What is the primary role of the kubelet in a Kubernetes cluster?

A

Managing networking

B

Monitoring applications

C

Running containers

D

Assigning IPs

Q12

Q12 Which Kubernetes component manages network rules to allow pods to communicate?

A

Kubelet

B

Kube-proxy

C

Kube-scheduler

D

Controller manager

Q13

Q13 Where is the cluster state stored in Kubernetes?

A

ConfigMap

B

etcd

C

Kube-proxy

D

Controller manager

Q14

Q14 What is the primary function of the controller manager in Kubernetes?

A

Enforcing policies

B

Managing controllers

C

Scaling replicas

D

Storing logs

Q15

Q15 What is the role of the scheduler in Kubernetes?

A

Managing API calls

B

Assigning pods to nodes

C

Balancing cluster state

D

Monitoring pods

Q16

Q16 What type of network model does Kubernetes use for pod communication?

A

Layer 4

B

Layer 7

C

Flat network

D

Hierarchical network

Q17

Q17 Which command displays the configuration of the kubelet on a node?

A

kubectl describe kubelet

B

kubectl get config

C

kubectl describe node

D

kubectl get kubelet

Q18

Q18 A node in a Kubernetes cluster is marked as "NotReady." What could be the reason?

A

Missing pod labels

B

Kubelet not running

C

Invalid container image

D

API server is down

Q19

Q19 What is a pod in Kubernetes?

A

A container group

B

A single container

C

A node

D

A service

Q20

Q20 What is the purpose of a ReplicaSet in Kubernetes?

A

Scaling applications

B

Storing logs

C

Managing nodes

D

Defining networks

Q21

Q21 Which command is used to delete a pod in Kubernetes?

A

kubectl remove pod

B

kubectl delete pod

C

kubectl drop pod

D

kubectl terminate pod

Q22

Q22 What is the primary use of a Deployment in Kubernetes?

A

Deploying images

B

Scaling and managing pods

C

Scheduling nodes

D

Managing services

Q23

Q23 What happens if a pod fails in a ReplicaSet?

A

It's recreated

B

It's deleted

C

Nothing happens

D

It's reconfigured

Q24

Q24 Which field in a Deployment ensures the pod uses a specific version of an image?

A

spec.strategy

B

spec.template.spec.containers.image

C

metadata.name

D

spec.selector

Q25

Q25 How do you scale a deployment to 5 replicas?

A

kubectl scale --replicas=5

B

kubectl scale deployment

C

kubectl add replicas 5

D

kubectl update replicas

Q26

Q26 Which command displays logs of a specific pod?

A

kubectl get logs

B

kubectl log pod

C

kubectl logs

D

kubectl describe logs

Q27

Q27 How do you update the image of a deployment using kubectl?

A

kubectl edit deployment

B

kubectl set image

C

kubectl update deployment

D

kubectl patch deployment

Q28

Q28 A pod is stuck in the "ContainerCreating" state. What is a likely cause?

A

Missing container

B

Failed image pull

C

Node unavailability

D

Resource constraints

Q29

Q29 A pod keeps restarting. What could be a potential issue?

A

Out of memory

B

Incorrect container port

C

Invalid ReplicaSet

D

Cluster down

Q30

Q30 A deployment rollout is paused. What command can you use to resume it?

A

kubectl restart rollout

B

kubectl resume rollout

C

kubectl rollout restart

D

kubectl rollout resume

ad verticalad vertical
ad