mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-02-22 07:03:28 +00:00
When waiting for the kube-apiserver to report 'ok' in the 'init' and 'join' phase 'wait-control-plane', a client constructed from the 'admin.conf' is used. In the case of the kube-apiserver, the discovery client is used so that anonymous-auth works. But if 'admin.conf' is used as is, it would point to the CPE and not the LAE. Implement a new method WaitControlPlaneClient() for both init.go and join.go that patches the 'Server' field in the loaded v1.Config to point to the LAE, before constructing a client set and using it in the kube-apiserver waiter.