sealos 部署k8s集群、
sealos init --passwd '123456' --master 172.16.34.125 --master 172.16.34.130 --node 172.16.34.127 --node 172.16.34.128 --pkg-url /opt/kube1.22.0.tar.gz --version v1.22.0
# kubectl get nodes
NAME STATUS ROLES AGE VERSION
sealos-k8s-node-01 NotReady control-plane,master 4m5s v1.22.0
sealos-k8s-node-02 NotReady <none> 2m39s v1.22.0
sealos-k8s-node-03 NotReady <none> 2m40s v1.22.0
sealos-k8s-node-04 NotReady control-plane,master 3m33s v1.22.0
各个节点都处于NotReady 状态、
# journalctl -xe | grep kubelet
...
May 18 13:47:56 sealos-k8s-node-04 kubelet[5038]: E0518 13:47:56.386059 5038 kubelet.go:2332] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized"
...
解决
systemctl restart containerd
# kubectl get nodes
NAME STATUS ROLES AGE VERSION
sealos-k8s-node-01 Ready control-plane,master 50m v1.22.0
sealos-k8s-node-02 Ready <none> 49m v1.22.0
sealos-k8s-node-03 Ready <none> 49m v1.22.0
sealos-k8s-node-04 Ready control-plane,master 50m v1.22.0
参考:https://blog.csdn.net/weixin_43421663/article/details/124020111