Closed dipiash closed 5 years ago
I'm answer my self :)
USER=ubuntu # customizable
CONTROL_PLANE_IPS="10.0.0.7 10.0.0.8" # customizable
for host in ${CONTROL_PLANE_IPS}; do
scp -rp /etc/kubernetes/pki/ca.crt "${USER}"@$host:/etc/kubernetes/pki/ca.crt
scp -rp /etc/kubernetes/pki/ca.key "${USER}"@$host:/etc/kubernetes/pki/ca.key
scp -rp /etc/kubernetes/pki/sa.key "${USER}"@$host:/etc/kubernetes/pki/sa.key
scp -rp /etc/kubernetes/pki/sa.pub "${USER}"@$host:/etc/kubernetes/pki/sa.pub
scp -rp /etc/kubernetes/pki/front-proxy-ca.crt "${USER}"@$host:/etc/kubernetes/pki/front-proxy-ca.crt
scp -rp /etc/kubernetes/pki/front-proxy-ca.key "${USER}"@$host:/etc/kubernetes/pki/front-proxy-ca.key
scp -rp /etc/kubernetes/pki/etcd/ca.crt "${USER}"@$host:/etc/kubernetes/pki/etcd/ca.crt
scp -rp /etc/kubernetes/pki/etcd/ca.key "${USER}"@$host:/etc/kubernetes/pki/etcd/ca.key
done
sudo kubeadm token create --print-join-command
You get command like this
kubeadm join 123.60.44.32:16443 --token XXXXXXXXXXX --discovery-token-ca-cert-hash sha256:dv3c44v17b4e98d764tcde98453156d7d9048fb921edd93d0e1ab7bfd09rtec3
kubeadm join 123.60.44.32:16443 --token XXXXXXXXXXX --discovery-token-ca-cert-hash sha256:dv3c44v17b4e98d764tcde98453156d7d9048fb921edd93d0e1ab7bfd09rtec3 --experimental-control-plane
Hi!
I have an existing cluster with 3 master and 5 worker nodes (Kubernetes v 1.14.x). I'm installed cluster from this guide - https://github.com/cookeem/kubeadm-ha/blob/master/README.md.
How can I add new control plane (master) node to existing configured claster?
On this new 2 control plane nodes I have a configured keepalived - it works with existing other 3 keepalived instances. And I have installed: kubeadm, kubectl, kubelet, docker and docker-compose on 2 control plane.
Please help