Kubernetes MCQs – Kubernetes Core Concepts

Understanding the core concepts of Kubernetes is crucial for mastering container orchestration. These concepts form the building blocks of how Kubernetes manages, deploys, and scales applications in a clustered environment. Key topics include Pods, ReplicaSets, Deployments, Services, Namespaces, and Labels.

These multiple-choice questions are designed to improve your foundational knowledge and help you prepare for interviews, certification exams, and real-world Kubernetes applications.

1.) What is the smallest deployable unit in Kubernetes?

A) Container
B) Node
C) Pod
D) Deployment

Answer: Option C

Explanation: A pod is the smallest and simplest unit in the Kubernetes object model that you can create or deploy.

2.) What does a ReplicaSet ensure in Kubernetes?

A) All pods are stopped
B) Only one pod runs at a time
C) Pods run on the same node
D) A specified number of pod replicas are running

Answer: Option D

Explanation: ReplicaSet ensures that a specified number of identical pod replicas are running at any given time.

3.) Which Kubernetes object is used to manage a set of identical pods with rolling updates?

A) pod
B) ReplicaSet
C) Deployment
D) Service

Answer: Option C

Explanation: Deployments manage ReplicaSets and allow declarative updates and rollbacks of pods.

4.) What is the primary function of a Service in Kubernetes?

A) Expose pods to network traffic
B) Store logs
C) Deploy containers
D) Manage storage

Answer: Option A

Explanation: A Service exposes pods to network traffic and ensures load balancing across them.

5.) What type of Service provides external access to pods?

A) ClusterIP
B) NodePort
C) InternalService
D) InternalService

Answer: Option B

Explanation: NodePort exposes the service on each Node’s IP at a static port.

6.) Which component of Kubernetes assigns pods to nodes?

A) Kubelet
B) Scheduler
C) Controller Manager
D) Etcd

Answer: Option B

Explanation: The Kubernetes Scheduler assigns newly created pods to suitable nodes.

7.) What is the role of a Namespace in Kubernetes?

A) Store configuration files
B) Host container logs
C) Create networks
D) Separate cluster resources logically

Answer: Option D

Explanation: Namespaces allow logical separation of resources within the same cluster.

8.) What is the default Namespace used when none is specified?

A) default
B) kube-system
C) public
D) kube-root

Answer: Option A

Explanation: If no namespace is specified, Kubernetes uses the “default” namespace.

9.) Which label selector type supports logical operations like AND/OR?

A) Equality-based
B) Range-based
C) Complex-based
D) Set-based

Answer: Option D

Explanation: Set-based selectors allow logical operators such as in, notin, and exists.

10.) Which object defines the desired state for a ReplicaSet?

A) Pod
B) Deployment
C) Namespace
D) ConfigMap

Answer: Option B

Explanation: Deployment defines the desired state of the application and manages ReplicaSets accordingly.

Leave a Reply

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