Add nodes in a HA cluster in kubernetes :
Once the masters are ready, nodes can be added into the system. The node should be finished with the prerequisite configuration as a worker node in the kubeadm cluster.
Need to start kublet:
$ sudo systemctl enable kubelet && sudo systemctl start kubelet
Run the join command as below . However, please change the master IP to the load balancer one:
// join command
$ sudo kubeadm join --token <CUSTOM_TOKEN> <LOAD_BALANCER_IP>:6443 --discovery-token-ca-cert-hash sha256:<HEX_STRING>
Then go to the first master or second master to check the nodes' status:
// see the node is added
$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
master01 Ready master 4h v1.10.2
master02 Ready master 3h v1.10.2
node01 Ready <none> 22s v1.10.2