Setting Up HAProxy Load Balancer for Kubernetes and Talos API
When running a highly available Kubernetes cluster with multiple control plane nodes, you need a load balancer to distribute API traffic across all control plane endpoints. This guide walks through setting up HAProxy 3.2 on Debian to load balance both the Kubernetes API (port 6443) and Talos API (port 50000). Architecture Overview Component Address Port Purpose HAProxy LB 192.168.66.160 6443 Kubernetes API HAProxy LB 192.168.66.160 50000 Talos API HAProxy LB 192.168.66.160 9600 Stats Dashboard Control Plane 1 192.168.66.161 6443/50000 talos-lon-cp01 Control Plane 2 192.168.66.162 6443/50000 talos-lon-cp02 Control Plane 3 192.168.66.163 6443/50000 talos-lon-cp03 Prerequisites Debian Trixie (or compatible) server for the load balancer Network connectivity to all control plane nodes Root or sudo access on the load balancer server Install HAProxy 3.2 HAProxy 3.2 is available from the official HAProxy Debian repository. First, add the repository signing key and apt source: ...