Join node to cluster and configure cluster using kubeadm config file

5/31/2020

I tried to figure out solution for the task.

  • Configure node master02 as a master node
  • Join the node node02 to the cluster I need to use the kubeadm configuration file located in /etc/kubeadm.conf for initialising cluster. Docker run on each nodes and apt is already configured.

I join the node node02 this way:

  • kubadm token create --print-join-command
  • kubeadm token list
  • ssh node02
  • kubeadm join 192.168.103.15:6443 --token

How to configure kubeadm from file /etc/kubeadm.conf and set master02 as the master ?

-- O.Man
kubeadm
kubernetes

1 Answer

5/31/2020
  1. Both kubeadm join and kubeadm init takes a parameter --config which can point to the path of kubeadm config file.

  2. If you do kubeadm init or kubeadm join --control-plane on a node it automatically becomes master node.

-- Arghya Sadhu
Source: StackOverflow