Let's Build a High-Availability Kubernetes Cluster on Bare-Metal Servers
Complete step-by-step guide to bootstrapping a 3-master stacked etcd High-Availability Kubernetes cluster on Ubuntu 24.04 bare-metal servers with containerd and Calico.
Mohan Kumar BN
Senior Platform Engineer & CNCF Certified Kubestronaut
Blueprint Topology
Mermaid Topology Specification (Architecture-as-Code) ▼
flowchart LR
Clients["kubectl / Worker Kubelets"] --> VIP["Floating VIP (192.168.10.100:6443)\nLB1 (Active) + LB2 (Backup)"]
VIP --> M1["Master 01\n(API + Stacked etcd)"]
VIP --> M2["Master 02\n(API + Stacked etcd)"]
VIP --> M3["Master 03\n(API + Stacked etcd)"]
M1 <-->|"etcd Raft Quorum"| M2 & M3 Architecture Overview
To run production workloads on bare-metal Ubuntu 24.04 servers without a cloud provider’s managed control plane, we design a 7-node High-Availability topology:
- 2x Load Balancer Nodes: Running HAProxy + Keepalived serving the floating Virtual IP (
192.168.10.100:6443). - 3x Control Plane Nodes: Running
kube-apiserver,kube-controller-manager,kube-scheduler, and a stacked etcd Raft quorum. - 2+ Worker Nodes: Running
containerd,kubelet, and Calico CNI for application workloads.
Bootstrapping the Stacked HA Control Plane
1. Initialize the First Control Plane Node (master-01)
sudo kubeadm init \
--control-plane-endpoint "192.168.10.100:6443" \
--upload-certs \
--pod-network-cidr=192.168.0.0/16
2. Join Additional Control Plane Nodes (master-02 & master-03)
Using the --control-plane and --certificate-key flags printed by kubeadm init, join the second and third control plane nodes to establish a 3-member etcd quorum:
sudo kubeadm join 192.168.10.100:6443 \
--token <token> \
--discovery-token-ca-cert-hash sha256:<hash> \
--control-plane \
--certificate-key <certificate-key>
3. Deploy Calico CNI & Verify etcd Health
kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.28.0/manifests/calico.yaml
kubectl get nodes -o wide
kubectl -n kube-system get pods -l component=etcd Related Engineering Blueprints
Install Rancher with Let's Encrypt on Kubernetes
Deploy SUSE Rancher on a Kubernetes cluster with NGINX Ingress Controller, cert-manager, and automated Let's Encrypt TLS certificate management.
RKE2 High-Availability Cluster Installation With Ansible
Automate the provisioning of a security-hardened, CIS-compliant Rancher RKE2 High-Availability Kubernetes cluster on Ubuntu nodes using idempotent Ansible playbooks.
Install an External Ceph Distributed Storage Cluster Using Ansible
Provision a self-healing, multi-node Ceph distributed storage cluster with Ansible to deliver replicated block (RBD), shared file (CephFS), and object storage for Kubernetes.