How to Set Up a 3-Node Kubernetes Cluster with Kubeadm

Introduction This guide will walk you through the following steps to set up a 3-node Kubernetes cluster using kubeadm: Configure unique hostnames for each node. Set up networking and update the /etc/hosts file. Install required system packages and disable swap. Install and configure the container runtime (containerd) and enable IP forwarding. Install Kubernetes components: kubeadm, kubelet, and kubectl. Initialize the control plane node with kubeadm. Set up pod networking using Calico CNI. Join worker nodes to the cluster. Verify the cluster status and apply additional configurations. Prerequisites Create three VMs or physical servers with Ubuntu 22.04 LTS or later. Make sure all nodes can communicate with each other over the network and has internet access. Setup Step 1: Setup Hostnames on all nodes On each node, set a unique hostname using the following command: ...

15 February, 2025 · 6 min · 1077 words · vijay