The pfSense and TrueNAS procedures are for people, so they no longer load as Claude context. The stack CLAUDE.md files keep only what the code cannot show.
1.9 KiB
0001: Control-plane VIP via pfSense + HAProxy, not kube-vip
Status: accepted (September 2026)
Context
The kubeconfig exported by 02-k8s-bootstrap pointed at master1Ip only, and the other nodes joined through it. Losing master-1 therefore broke API access even though the cluster runs three embedded-etcd masters.
The fix needs one address that reaches any healthy API server. kube-vip documents a control-plane mode (cp_enable) for exactly this on k3s, and kube-vip already runs in this cluster as the DaemonSet that announces the Traefik LoadBalancer VIP.
Decision
The control-plane VIP is a pfSense IP Alias Virtual IP with HAProxy load-balancing TCP 6443 across the three masters, as an opaque passthrough. It is not a second kube-vip instance.
In 02-k8s-bootstrap:
- master-1 is installed with a
--tls-sanfor bothmaster1IpandcontrolPlaneVipAddress. - master-2, master-3 and all workers join through the VIP.
- The exported
kubeconfigpoints at the VIP.
Why not kube-vip control-plane mode
When this was decided, the existing kube-vip VIP for Traefik had an unresolved ARP-failover problem: a drained node kept announcing the VIP because drain does not evict DaemonSet pods. Putting API access behind a second ARP-announced VIP would have made the most critical endpoint depend on the same unproven failure mode. A VIP held by the router, outside the cluster, fails independently of it.
Consequences
- The pfSense side is manual. The
marshallford/pfsenseprovider has no Virtual IP or HAProxy resources. Steps: runbook. - pfSense becomes a dependency for API access.
- Existing masters need the extra TLS SAN before the VIP works for them; a fresh bootstrap gets it from the code.
- If API-server HA comes up again, kube-vip
cp_enablewas considered and rejected for the reason above. Revisit only if the ARP-failover behaviour is understood and fixed.