What happened?
Workers never join when the control-plane Service has an IPv6 LoadBalancer address:
unable to create certificates signing request client: host must be a URL or a host:port pair: "https://xxxx:xxxx:11:1103:t::3:443"
internal/controller/bootstrap/worker_bootstrap_controller.go:532 (also :534, and
controlplane_bootstrap_controller.go:698 and :710) build the URL with
fmt.Sprintf("https://%s:%d", host, port). An IPv6 literal needs brackets —
net.JoinHostPort adds them, which is what k0s does in pkg/apis/k0s/v1beta1/api.go.
The endpoint itself is fine: curl -sk 'https://[https://xxxx:xxxx:11:1103:t::3]/version' → 401.
Involved Areas
Cluster API integration
What did you expect to happen?
The worker joins. The join URL has to be https://[https://xxxx:xxxx:11:1103:t::3]:443 — an IPv6 literal in a URL needs brackets.
Steps to reproduce
- Dual-stack management cluster with an IPv6 LoadBalancer pool (MetalLB here).
- K0smotronControlPlane with service.type: LoadBalancer, apiPort 443, and a Service that ends up single-stack IPv6, so the VIP is an IPv6 address.
- Create a worker Machine.
The control plane comes up and answers on https://[]:443, the worker aborts while bootstrapping the kubelet.
k0smotron version
2.0.4
k0s version
1.36.2+k0s.0
Anything else we need to know?
No response
What happened?
Workers never join when the control-plane Service has an IPv6 LoadBalancer address:
internal/controller/bootstrap/worker_bootstrap_controller.go:532(also:534, andcontrolplane_bootstrap_controller.go:698and:710) build the URL withfmt.Sprintf("https://%s:%d", host, port). An IPv6 literal needs brackets —net.JoinHostPortadds them, which is what k0s does inpkg/apis/k0s/v1beta1/api.go.The endpoint itself is fine:
curl -sk 'https://[https://xxxx:xxxx:11:1103:t::3]/version'→ 401.Involved Areas
Cluster API integration
What did you expect to happen?
The worker joins. The join URL has to be https://[https://xxxx:xxxx:11:1103:t::3]:443 — an IPv6 literal in a URL needs brackets.
Steps to reproduce
The control plane comes up and answers on https://[]:443, the worker aborts while bootstrapping the kubelet.
k0smotron version
2.0.4
k0s version
1.36.2+k0s.0
Anything else we need to know?
No response