Kubernetes MCQs – Introduction to Kubernetes

21.) What is a Kubernetes Namespace used for?

A) Isolating workloads
B) Assigning pod IPs
C) Mounting volumes
D) Controlling container logs

Answer: Option A

Explanation: Namespaces allow for logical separation of Kubernetes resources in a single cluster.

22.) What does a DaemonSet ensure in Kubernetes?

A) Multiple containers run per pod
B) One pod runs on each node
C) Volume is attached to each pod
D) Pods restart on failure

Answer: Option B

Explanation: DaemonSets ensure that a specific pod runs on all (or some) nodes.

23.) What is Helm in Kubernetes?

A) A load balancer
B) A monitoring tool
C) A package manager
D) A node scheduler

Answer: Option C

Explanation: Helm is used to manage Kubernetes applications using Helm Charts (like apt or yum for Kubernetes).

24.) What does Ingress do in Kubernetes?

A) Monitor pod logs
B) Schedule containers
C) Manage internal networking
D) Control external access to services

Answer: Option D

Explanation: Ingress manages external access (usually HTTP/HTTPS) to services in a cluster.

25.) Which is the correct command to apply a configuration file?

A) kubectl create -f config.yaml
B) kubectl add config.yaml
C) kubectl apply -f config.yaml
D) kubectl install config.yaml

Answer: Option C

Explanation: kubectl apply is used to apply configuration from a file.

26.) What is a Secret in Kubernetes?

A) A hidden pod
B) A log file
C) A secure object to store sensitive data
D) A container policy

Answer: Option C

Explanation: Secrets store sensitive data like passwords, tokens, and keys securely.

27.) What file format is typically used for Kubernetes configurations?

A) JSON only
B) YAML only
C) YAML or JSON
D) XML

Answer: Option C

Explanation: Kubernetes supports both YAML and JSON formats for configuration files.

28.) What is the role of kube-proxy?

A) Handles pod security
B) Manages container runtime
C) Maintains network rules and traffic routing
D) Monitors cluster performance

Answer: Option C

Explanation: kube-proxy handles network traffic and routes traffic to the correct pod in the cluster.

29.) Which Kubernetes component handles health checks and liveness probes?

A) kube-scheduler
B) kubelet
C) etcd
D) controller-manager

Answer: Option B

Explanation: The kubelet is responsible for checking the health of pods and containers.

30.) What does a Deployment manage in Kubernetes?

A) Only pod restarts
B) Persistent storage
C) ReplicaSets and update strategies
D) Network policies

Answer: Option C

Explanation: A Deployment manages ReplicaSets and supports rolling updates, scaling, and rollbacks.

Kubernetes MCQs, Introduction to Kubernetes

Leave a Reply

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