How to add a master node to the kubernetes cluster

2/20/2020

I set up a kubernetes cluster. And I want to add a master node to the cluster. my cluser version is 1.17.0 . what's the join command is? i can't find Related docs about the command on the official website.

-- Esc
kubeadm
kubernetes

1 Answer

2/20/2020

To join another master follow the below steps:

  1. Generate the certificate key

    kubeadm alpha certs certificate-key

  2. Print the join command

    kubeadm token create --print-join-command

  3. Add the following flags to the above join command

    --control-plane --certificate-key "Certificate-key from step 1"

  4. Command should look like below

    sudo kubeadm join 192.168.0.200:6443 --token 9vr73a.a8uxyaju799qwdjv --discovery-token-ca-cert-hash sha256:7c2e69131a36ae2a042a339b33381c6d0d43887e2de83720eff5359e26aec866 --control-plane --certificate-key f8902e114ef118304e561c3ecd4d0b543adc226b7a07f675f56564185ffe0c07

-- shashank tyagi
Source: StackOverflow