I am Installing a standalone Kubernetes cluster (kubeadm version is 1.14) on RHEL 7.7 Operating System. I have a Load Balancer (Private LB with a private IP address) configured for my Kubernetes master node. When I issued the command
kubeadm init --apiserver-advertise-address=<IP Address of the LB>
I got the below error:
Unable to register node "master node name" with API Server. write tcp "IP address of masternode":<52444>–"IP address of LB":6443. Connection reset by peer.
If I issue only
kubeadm init, the command successfully initiates the cluster.
Also, If I use the DNS of the LB and try to create a multi-plane cluster (using controlPlaneEndpoint as DNS of the LB), that also works. Any idea on why it fails with the
Also, what if I use the method of creating a multi-plane cluster (controlPlaneEndpoint) but use the cluster that is built as a standalone cluster? (i.e., not adding any further master nodes). Will it cause any issues?
If I understand your use case correctly this might not be possible.
apiserver-advertise-address is being used to set the node interface in which the
api-server will bind. Therefore, you can't bind to LB interface because it is not an actual interface. Official source:
(Optional) Unless otherwise specified,
kubeadmuses the network interface associated with the default gateway to set the advertise address for this particular control-plane node's API server. To use a different network interface, specify the
kubeadm init. To deploy an IPv6 Kubernetes cluster using IPv6 addressing, you must specify an IPv6 address, for example
--apiserver-advertise-addresscan be used to set the advertise address for this particular control-plane node's API server,
--control-plane-endpointcan be used to set the shared endpoint for all control-plane nodes.
Answered by OhHiMark on August 25, 2020
Get help from others!