From the course: Certified Kubernetes Administrator (CKA) Cert Prep

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Adding nodes to the cluster

Adding nodes to the cluster

- Okay, the final step in setting up the cluster is to add nodes to the cluster. Before you are adding nodes, make sure that the node name is set to what you want to use, because this node name will be hard coded. And if later you think, oh, I need a different node name, it's very difficult to add. The only option is to remove the node and add the node again. And that's too much work. Now, when the Kubernetes cluster is initialized, a joint token is generated, and you will see this joint token on screen. And you can use this joint token to join other nodes using sudo kubeadm join from the hosts that you want to join. Best thing to do is just copy paste the sudo kubeadm join command from the output of kubeadm in it. And in case a joint token is lost or expired, you can generate a new one using sudo kubeadm token create -- print-join-command. Now let me demonstrate how this works. So we will need to investigate the information on the control node, and then on the other nodes, we can…

Contents