Kubernetes MCQs – Setting Up Kubernetes

Setting up Kubernetes is the first hands-on step to begin your journey with container orchestration. Whether you’re deploying a local development cluster with Minikube or building a production-grade setup using kubeadm or managed Kubernetes services like Amazon EKS, it’s important to understand the components, configurations, and networking involved.

This section focuses on the different methods to install and configure Kubernetes clusters, prerequisites, and essential tools used during setup. These MCQs will help reinforce your understanding and prepare you for real-world installations as well as interview questions.

1.) Which tool is commonly used to set up a local single-node Kubernetes cluster for learning and development?

A) kubeadm
B) Minikube
C) Kustomize
D) Helm

Answer: Option B

Explanation: Minikube allows you to run a single-node Kubernetes cluster locally for learning and testing.

2.) What is the default container runtime used by Minikube?

A) rkt
B) Docker
C) CRI-O
D) containerd

Answer: Option D

Explanation: As of recent releases, Minikube defaults to using containerd, though Docker can also be configured.

3.) What does kubeadm primarily do?

A) Creates and manages containers
B) Automates Helm chart deployments
C) Bootstraps a Kubernetes control plane
D) Configures kubectl context

Answer: Option C

Explanation: kubeadm is used to initialize and configure a Kubernetes control plane (master node).

4.) Which component is required to interact with the Kubernetes cluster from the command line?

A) Minikube
B) kubeadm
C) kubelet
D) kubectl

Answer: Option D

Explanation: kubectl is the command-line tool used to manage Kubernetes clusters.

5.) What is the default network plugin used by Minikube?

A) Flannel
B) Calico
C) Cilium
D) None (uses built-in networking)

Answer: Option D

Explanation: Minikube comes with its own simple built-in networking for ease of use.

6.) Which command initializes the control plane node using kubeadm?

A) kubeadm start
B) kubeadm init
C) kubeadm launch
D) kubeadm up

Answer: Option B

Explanation: The kubeadm init command sets up the control plane on a master node.

7.) Which configuration file is created for kubectl to interact with the cluster?

A) kube.cfg
B) config.json
C) ~/.kube/config
D) kube_config.yml

Answer: Option C

Explanation: The kubeconfig file located at ~/.kube/config stores cluster access details for kubectl.

8.) How do you install a pod network add-on after setting up a cluster with kubeadm?

A) kubectl apply -f [network.yaml]
B) kubeadm setup network
C) kubectl create network
D) minikube start network

Answer: Option A

Explanation: You use kubectl to apply a YAML file defining the pod network add-on.

9.) What is the role of kubelet during Kubernetes setup?

A) It creates pods
B) It serves the Kubernetes dashboard
C) It runs on every node and ensures containers are running
D) It schedules pods

Answer: Option C

Explanation: The kubelet is an agent that runs on each node and maintains pod and container status.

10.) How do you add a worker node to an existing Kubernetes cluster using kubeadm?

A) kubeadm join
B) kubeadm attach
C) kubeadm connect
D) kubeadm start

Answer: Option A

Explanation: The kubeadm join command is used on worker nodes to join them to the cluster.

Leave a Reply

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