Description
/kind feature
Describe the solution you'd like
Currently, the Kubernetes API server endpoint is always set to the load balancer's IPv4 address. I'm setting up a Hetzner cluster with IPv6-only nodes and a private network; all incoming traffic would be handled by Hetzner load balancers. As the API server endpoint is set to an IPv4 address, nodes cannot reach the API server after kubeadm initialization (dial tcp 167.xxx.xxx.xxx: connect: network is unreachable
).
As far as I can tell, a pure IPv6 setup is currently not possible without manually configuring a load balancer and DNS so a hostname can be used for spec.controlPlaneEndpoint.host
in the HetznerCluster manifest.
Looking at the code that determines the endpoint, I think it should be possible to add a property to the controlPlaneLoadBalancer
object (e.g. useV6Endpoint
). If this property were set to true
, the control plane endpoint would be set to the LB's IPv6 address instead of the IPv4 one in the code section below:
cluster-api-provider-hetzner/controllers/hetznercluster_controller.go
Lines 244 to 265 in 3bc16ac
Please let me know what you think, I'd be happy to contribute a PR if this seems feasible/desirable.
Anything else you would like to add:
Related issues: #632, #899
Environment:
- cluster-api-provider-hetzner version: v1.0.0-beta.29
- Kubernetes version: 1.29.1
- OS (e.g. from
/etc/os-release
): ubuntu-22.04