update recovery script

This commit is contained in:
2022-03-26 09:24:08 +11:00
parent 58091645f6
commit a644d72860
2 changed files with 17 additions and 15 deletions
+9 -7
View File
@@ -39,7 +39,8 @@ systemctl restart docker
docker system info --format '{{.CgroupDriver}}'
# re init cluster
sudo kubeadm init --ignore-preflight-errors=DirAvailable--var-lib-etcd --control-plane-endpoint home.toozhao.com --pod-network-cidr=10.244.0.0/16
sudo kubeadm init --ignore-preflight-errors=DirAvailable--var-lib-etcd --control-plane-endpoint 192.168.1.2 \
--pod-network-cidr=10.244.0.0/16 --v 5
yo# check logs
@@ -48,8 +49,14 @@ journalctl -xeu kubelet -f
# install fiannel
kubectl -n kube-system apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
## Add new nodes as control plane
# first prepre certificate key, run this one the existing control plan
kubeadm init phase upload-certs --upload-certs
# print join command
sudo kubeadm token create --print-join-command
sudo kubeadm token create --print-join-command
# kubelet docker cgroupfs issue
@@ -58,11 +65,6 @@ vim /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
# update KUBELET_CGROUP_ARGS=--cgroup-driver=systemd to KUBELET_CGROUP_ARGS=--cgroup-driver=cgroupfs
## Add new nodes as control plane
# first prepre certificate key, run this one the existing control plan
kubeadm init phase upload-certs --upload-certs
# run the following the node to be added
kubeadm join 192.168.1.2:6443 --token xxx --discovery-token-ca-cert-hash sha256:xxx --control-plane --certificate-key xxx