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 --apiserver-advertise-address
?
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?
Best Answer
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 theapi-server
will bind. Therefore, you can't bind to LB interface because it is not an actual interface. Official source: