...
> kubectl taint nodes --all node-role.kubernetes.io/master-
Copy Certificates to Master Nodes
> sudo su
> vi copyCertsToMasters.sh
...
> ./copyCertsToMasters.sh
Move Certificates on Other Master Nodes
> ssh test@172.20.233.182
> sudo su
> vi moveFilesFromMaster.sh
Code Block | ||||
---|---|---|---|---|
| ||||
USER=test # customizable
mkdir -p /etc/kubernetes/pki/etcd
mv /home/${USER}/ca.crt /etc/kubernetes/pki/
mv /home/${USER}/ca.key /etc/kubernetes/pki/
mv /home/${USER}/sa.pub /etc/kubernetes/pki/
mv /home/${USER}/sa.key /etc/kubernetes/pki/
mv /home/${USER}/front-proxy-ca.crt /etc/kubernetes/pki/
mv /home/${USER}/front-proxy-ca.key /etc/kubernetes/pki/
mv /home/${USER}/etcd-ca.crt /etc/kubernetes/pki/etcd/ca.crt
mv /home/${USER}/etcd-ca.key /etc/kubernetes/pki/etcd/ca.key
mv /home/${USER}/admin.conf /etc/kubernetes/admin.conf |
> chmod +x moveFilesFromMaster.sh
> ./moveFilesFromMaster.sh
Join the Other Master Nodes
From k8smaster2 and k8smaster3 issue the following commands:
> sudo su
> kubeadm join k8slb.ott.dev.intra:6443 --token 80g665.bhpvg9w5inpgeimt --discovery-token-ca-cert-hash sha256:2b37c8b0ce18cc9710eb53c7eb7ece209645b02bd906da2f09f26b8f1d29fb9e --experimental-control-plane
Notice the addition of the --experimental-control-plane
flag. This flag automates joining this control plane node to the cluster.
Verify that the node has joined the cluster:
From the k8smaster1 under the test account issue the following command:
> kubectl get pod -n kube-system -w
Install Dashboard
From the master node:
...