Joining new node to kubernetes cluster

First way-

Note: you need to run all these commands on master/control plane node.

kubeadm token list

749p22.f2342qewnc6zu1cc

2. Finding the CA cert hash-

openssl x509 -pubkey -in /etc/kubernetes/pki/ca.crt | openssl rsa -pubin -outform der 2>/dev/null | openssl dgst -sha256 -hex | sed 's/^.* //'

9dbced71cc46c36d03515ee23d21d9dad06bd1d0fa2e89ecc9f13d057e3c42e3

3. IP address of control plane/master node-

ip a

172.16.94.10

4. Joining new node(run this on new node to be joined)-

kubeadm join 172.16.94.10:6443 --token 749p22.f2342qewnc6zu1cc --discovery-token-ca-cert-hash sha256:9dbced71cc46c36d03515ee23d21d9dad06bd1d0fa2e89ecc9f13d057e3c42e3

Second way-

This command automatically generates the node join command.

kubeadm token create --print-join-command

Thanks for reading!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store