Guide Revisions - Building a production-ready Kubernetes cluster from scratch
Back to the guideThis page tracks all changes and updates to this guide.
-
2026-11-15 - Corrected host versus forwarded UFW rules and pod-to-kubelet access, and Longhorn networking guidance
Lesson 10 keeps the existing kubelet rules for TCP port
10250. The explicit localhost allowances for the obsolete scheduler and controller-manager ports10251and10252were removed. Their secure endpoints use10259and10257and bind to loopback in this kubeadm setup, where UFW already permits traffic. Removing those redundant allowances does not broaden access.Lesson 12 adds access from local pods to their node’s kubelet, needed by components such as metrics-server. The rule is limited to the node’s assigned pod CIDR, the
cni0interface, the node’s IP address, and TCP port10250. - 2026-11-15 - Added kubelet resource reservations and cluster DNS availability checks
-
2026-11-15 - Added HAProxy readiness checks and Keepalived service tracking, and clarified HA failure-test limits
Lesson 15 configures the virtual IP only in Keepalived’s
virtual_ipaddressblock. Astatic_ipaddressassignment is independent of the VRRP MASTER/BACKUP role and can leave the VIP assigned on multiple nodes. Letting the VRRP instance manage the address allows a BACKUP to acquire it when the MASTER fails.Keepalived also tracks the local HAProxy service through a
vrrp_scriptreferenced by each node’strack_script. Without this check, a node can retain the VIP even when HAProxy has stopped, leaving clients with no working load balancer. The script checks service activity every two seconds. Two consecutive failures put the VRRP instance into FAULT, allowing a healthy BACKUP to take over, and two consecutive successes clear the script failure. This checks whether the service is active, not whether it is successfully handling requests.HAProxy checks each API server separately using HTTPS
GET /readyzand requires HTTP200. A TCP connection alone does not establish that an API server is ready to serve requests. Thecheck-sslsetting enables TLS for the health probe, whileverify noneskips certificate verification for that probe only. Client TLS connections still pass through unchanged. The lesson also notes that the cluster CA can be used to authenticate the probe’s backend.The VRRP password explanation clarifies that all nodes must use the same value, only the first eight characters are used, and PASS authentication does not encrypt traffic or replace network access controls. The fictitious
password123example remains in the configuration.Configuration-validation commands check HAProxy and Keepalived before reloading them.
Lesson 16 distinguishes a kubelet heartbeat interruption from a complete node failure. Stopping kubelet can mark a node
NotReadywhile existing containers, including API server and etcd containers, continue running. HAProxy and Keepalived also remain active. The headings, instructions, and conclusions now describe what this test demonstrates without claiming full node-failure resilience. Network disconnection is no longer presented as an interchangeable step in the heartbeat test.The readiness and CoreDNS placement checks identify prerequisites and possible DNS availability risks; they do not test DNS failover. The precautions call for healthy control-plane and etcd members, a current etcd snapshot, recovery access, and testing one node at a time. A three-member etcd cluster needs two available members for quorum.
A separate load-balancer test stops HAProxy on the actual VIP owner to exercise Keepalived’s service tracking. API requests from another healthy node use the VIP, allowing the reader to check that a BACKUP acquires the address and requests recover. Services are restored and cluster health checked between tests so that failures remain isolated. This tests load-balancer service failover, not the loss of an entire control-plane node.
- 2025-02-25 - Initial release of the guide
- 2025-03-16 - Added warning about microSD cards and updated hardware recommendations
- 2025-03-22 - Changed container runtime setup to use NVMe drive for storage
- 2025-03-22 - Added comments to
ufwrules to clarify the purpose of each rule - 2025-03-22 - Added instructions to install
etcdctlto recover from etcd cluster health issues
If you find errors or have suggestions for improvements:
- Open an issue on the GitHub repository
- Submit a pull request with your proposed changes
- Contact the author through the website
Thanks to all contributors and reviewers who helped improve this guide.