-2

When creating a Kubernetes cluster using kubeadm, do we need to install kubelet and Docker on master nodes as well? if yes why?

Ohad
  • 1,563
  • 2
  • 20
  • 44

2 Answers2

0

As mentioned in the document:

Following are the high-level steps involved in setting up a Kubernetes cluster using kubeadm.

  1. Install container runtime on all nodes- We will be using Docker.We need to install Docker on all the nodes.

  2. Install Kubeadm, Kubelet, and kubectl on all the nodes.

  3. Initiate Kubeadm control plane configuration on the master node.

  4. Save the node join command with the token. Install the Calico network plugin.

  5. Join the worker node to the master node (control plane) using the join command.

  6. Validate all cluster components and nodes.

  7. Install Kubernetes Metrics Server Deploy a sample app and validate the app

Refer to this stackpost for more information

Fariya Rahmat
  • 2,123
  • 3
  • 11
0

Answering you specific question,

When creating a Kubernetes cluster using kubeadm, do we need to install kubelet and Docker on master nodes as well? if yes why?

The master node is responsible for cluster management and for providing the API that is used to configure and manage resources within the K8s env.

Master node components can be run within Kubernetes itself, as a set of containers within a pods so for that Docker or container Runtime like containerD is required.

The master node consists of the API server POD, Etcd POD and Diff Schdulers PODs.

The master node is also usually configured as a worker node within the cluster. Therefore, the master node also runs the standard node services: the kubelet service, the container runtime and the kube proxy service. Note that it is possible to taint a node to prevent workloads from running on an inappropriate node. The kubeadm utility automatically taints the master node so that no other workloads or containers can run on this node.

This helps to ensure that the master node is never placed under any unnecessary load and that backup and restore of the master node for the cluster is simplified.

Harsh Manvar
  • 27,020
  • 6
  • 48
  • 102