ubicloud/rhizome/kubernetes/bin
mohi-kalantari 25e1f70505 Remove apiserver.advertise-address from kubeadm config to prevent outdated IP in upgrades
Upgrades (including control plane VM replacements) caused disruptions in
pod-to-service communication. Symptoms included CoreDNS failing to reach the
API server ("no route to host"), leading to DNS resolution failures (e.g.,
connection refused to kube-dns at 10.96.0.10), reject rules in iptables, and
broader service access issues. Pod-to-pod and pod-to-host traffic were
unaffected, indicating a service endpoint problem.

Root cause: The kubeadm-config ConfigMap set apiServer.extraArgs.advertise-
address to a static IP (e.g., the initial control plane IP). During upgrades,
this IP became outdated as new VMs received new IPs, but the config wasn't
updated. This led to:

- kube-apiserver advertising the old IP

- The default/kubernetes service’s Endpoints/EndpointSlice being recreated with
the wrong backend IP

- kube-proxy DNAT rules routing traffic (e.g., to 10.96.0.1:443) to the
unreachable old IP

- Circular dependency: CoreDNS couldn’t sync with the API, preventing readiness
and worsening DNS issues.

Solution: Remove the advertise-address arg entirely from kubeadm-config. This
lets kube-apiserver auto-detect and advertise the node’s primary interface IP
(default behavior per Kubernetes docs). On upgrade:

- New control plane VMs advertise their current IP

- Endpoints/EndpointSlice update automatically during manifest regeneration or
upgrade apply

This fix applies universally:

Single-node: Prevents total disruption from IP changes

Multi-node (HA): Each control plane node advertises its own IP;
Endpoints include all nodes for failover
2025-11-17 16:53:59 +01:00
..
init-cluster Remove apiserver.advertise-address from kubeadm config to prevent outdated IP in upgrades 2025-11-17 16:53:59 +01:00
install-metrics-server Install Metrics Server on new Kubernetes Clusters 2025-07-14 14:13:41 +03:00
join-node Start listening on ipv6 ip of nodes in control plane nodes 2025-04-30 16:30:24 +02:00
setup-cni Introduce Ubicni for establishing intra-cluster network connectivity 2025-02-04 08:56:06 +01:00
ubicni Move CNI logic to lib and improve tests 2025-02-04 08:56:06 +01:00