Building a 3-Node Kubernetes Homelab on AlmaLinux
Table of Contents
Setting up a production-grade bare-metal K8s cluster using kubeadm, Flannel CNI, and MetalLB. Managed K8s (EKS, GKE) abstracts away the hard parts. Building it yourself teaches you what’s actually happening beneath the surface. Install Flannel CNI and MetalLB next — covered in part 2. Why Bare Metal?
Cluster Specs
Node Role RAM CPU k8s-master Control Plane 4GB 4 vCPU k8s-worker01 Worker 4GB 4 vCPU k8s-worker02 Worker 4GB 4 vCPU Install kubeadm
swapoff -a
sed -i '/ swap / s/^/#/' /etc/fstab
# Install containerd
dnf install -y containerd
systemctl enable --now containerd
# Add K8s repo and install
dnf install -y kubeadm kubelet kubectl
systemctl enable --now kubelet Bootstrap the cluster
kubeadm init \
--pod-network-cidr=10.244.0.0/16 \
--apiserver-advertise-address=<MASTER_IP>