1.根据 https://github.com/cookeem/kubeadm-ha/blob/master/README_CN.md 去搭建ha集群,遇到几个问题:
runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized
Readiness probe failed: Get http://10.2.1.126:9099/readiness: dial tcp 10.2.
由于先kubeadm初始化 再安装calico网络组件 $ kubectl apply -f calico/
导致get nodes 时总是notready,再安装完caloco组件后就变成ready
2.Warning FailedMount 1m (x14 over 13m) kubelet, master2
MountVolume.SetUp failed for volume "timezone" : hostPath type check failed: /etc/timezone is not a file
这是由于
/etc/timezone不是文件而是文件夹导致的,删除后改为文件就可以
3发现一个有用的命令:
journalctl -u kubelet --no-pager
通过journalctl -u kubelet.service命令来查看kubelet服务的日志