Deploying k8s Cluster 04 with KUBEADM-Configuring Kubelet Access Kube-apiserver
2018/1/4
Configuring Kubelet Access Kube-apiserver
- Switch master node to connect to the Apiserver of this node
- Toggle worker node connected to Apiserver's LB portal (recorded in the corresponding document)
- Premise: This LB has been deployed to complete
Switch master node to connect to the Apiserver of this node
[[email protected] ~]# sed-i ' s#https://10.10.9.67:6443#https://10.10.9.68:6443# '/etc/kubernetes/ Kubelet.conf[[email protected] ~]# systemctl restart kubelet[[email protected] ~]# sed-i ' s#https:// 10.10.9.67:6443#https://10.10.9.69:6443# '/etc/kubernetes/kubelet.conf[[email protected] ~]# systemctl Restart kubelet### observation log, not found exception # # # Watch TCP link [[email protected] ~]# ss-antp4 |grep 10.10.9.67:6443estab 0 0 10.10.9.67:27162 10.10.9.67:6443 Users: (("Kubelet", pid=21837,fd=27)) estab 0 0 10.10.9.67:27230 10.10.9.67:6443 Users: (("Kube-controller", pid=22104,fd=25)) Estab 0 0 10.10.9.67:27174 10.10.9.67:6443 Users: (("Kube-controller", pid=22104,fd=5)) estab 0 0 10.10.9.67:27172 10.10.9.67:6443 Users: (("Kube-scheduler", pid=22099,fd=6) EST AB 0 0 10.10.9.67:27190 10.10.9.67:6443 Users: (("Kube-proxy", pid=22371,fd=9)) [[email protected] ~]# ss-antp4 |grep ': 6443 ' estab 0 0 10.10.9.68:65468 10.10.9.67:6443 Users: (("Kube-proxy", pid=11087,fd=5)) Estab 0 0 127.0.0.1:62230 127.0.0.1:6443 Users: (("Kube-apiserver", pid=27042,fd=73)) Estab 0 0 10.10.9.68:46188 10.10.9.68:6443 Users: (("Kubelet", pid=5107,fd=12)) [[EMAIL PR Otected] ~]# ss-antp4 |grep ': 6443 ' estab 0 0 10.10.9.69:6926 10.10.9.67:6443 Users: (("Kube-proxy", pid=32456,fd=5) estab 0 0 10.10.9.69:59622 10.10.9.69:6443 Users: (("Kubelet", pid=27268,fd=10) estab 0 0 127.0.0.1:7328 127.0.0.1:6443 US ERS: (("Kube-apiserver", pid=15150,fd=73) # # # is expected, the Kubelet service of the above 2 nodes is not connected to the 10.10.9.67:6443 (Apiserver address before switching)
Deploy k8s cluster 04 with KUBEADM-Configure Kubelet access Kube-apiserver