What is the simplest way to attach a node configuring kubelet?

11/23/2018

I have created these files ca.cert and kubelet.service (systemd file with apiserver's IP and options). How can I simply add this new node to the cluster?

-- manzion_111
kubelet
kubernetes

1 Answer

11/23/2018

To do this in the latest version (tested on 1.12) you can issue following command on the master node:

kubeadm token create --print-join-command

It will then print out a new join command (like the one you got after kubeadmn init):

kubeadm join 192.168.1.101:6443 --token tokentoken.lalalalaqyd3kavez --discovery-token-ca-cert-hash sha256:complexshaoverhere

Now run the above command on worker node, it must have docker, kubelet and kubeadm installed. You will be able to join the worker node.

Refer this official document here for more details.

-- Prafull Ladha
Source: StackOverflow