Adding nodes in a HA cluster

Once the masters are ready, you can add nodes into the system. This node should be finished with the prerequisite configuration as a worker node in the kubeadm cluster. And, in the beginning, you should start kubelet as the master ones:

// now you're in the second master
$ sudo systemctl enable kubelet && sudo systemctl start kubelet

After that, you can go ahead and push the join command you copied. However, please change the master IP to the load balancer one:

// your join command should look similar to following one
$ sudo kubeadm join --token <CUSTOM_TOKEN> <LOAD_BALANCER_IP>:6443 --discovery-token-ca-cert-hash sha256:<HEX_STRING>

You can then jump to the first master or second master to check the nodes' status:

// you can 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
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.223.127