Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: 单节点部署节点Notready #1663

Closed
openstack-test opened this issue Aug 30, 2022 · 9 comments
Closed

BUG: 单节点部署节点Notready #1663

openstack-test opened this issue Aug 30, 2022 · 9 comments

Comments

@openstack-test
Copy link

openstack-test commented Aug 30, 2022

问题
部署单节点后,节点一直处于Notready状态。
安装命令

sealos run labring/kubernetes:v1.24.0 --single
# kubectl get nodes
NAME   STATUS     ROLES           AGE   VERSION
k8s    NotReady   control-plane   11m   v1.24.0

查看日志,提示 Network plugin returns error: cni plugin not initialized

# journalctl -f
-- Logs begin at Tue 2022-08-30 08:37:32 EDT. --
Aug 30 08:49:56 k8s kubelet[3727]: E0830 08:49:56.900991    3727 kubelet.go:2344] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized"
Aug 30 08:50:01 k8s kubelet[3727]: E0830 08:50:01.906643    3727 kubelet.go:2344] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized"
Aug 30 08:50:06 k8s kubelet[3727]: E0830 08:50:06.908499    3727 kubelet.go:2344] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized"
Aug 30 08:50:11 k8s kubelet[3727]: E0830 08:50:11.911566    3727 kubelet.go:2344] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized"
Aug 30 08:50:16 k8s kubelet[3727]: E0830 08:50:16.914290    3727 kubelet.go:2344] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized"
Aug 30 08:50:21 k8s kubelet[3727]: E0830 08:50:21.915318    3727 kubelet.go:2344] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized"
Aug 30 08:50:26 k8s kubelet[3727]: E0830 08:50:26.923991    3727 kubelet.go:2344] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized"
Aug 30 08:50:31 k8s kubelet[3727]: E0830 08:50:31.926651    3727 kubelet.go:2344] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized"
Aug 30 08:50:36 k8s kubelet[3727]: E0830 08:50:36.928546    3727 kubelet.go:2344] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized"

查看pod

# kubectl get po -A
NAMESPACE     NAME                          READY   STATUS    RESTARTS   AGE
kube-system   coredns-6d4b75cb6d-9jp9z      0/1     Pending   0          10s
kube-system   coredns-6d4b75cb6d-tdmtx      0/1     Pending   0          11m
kube-system   etcd-k8s                      1/1     Running   0          11m
kube-system   kube-apiserver-k8s            1/1     Running   0          11m
kube-system   kube-controller-manager-k8s   1/1     Running   0          11m
kube-system   kube-proxy-x97tc              1/1     Running   0          11m
kube-system   kube-scheduler-k8s            1/1     Running   0          11m

尝试过的解决办法,均无效

 systemctl restart containerd
 systemctl restart kubelet

版本描述
OS:CentOS Linux release 7.9.2009 (Core)
sealos : 4.1.0-rc3

@cuisongliu
Copy link
Collaborator

没装cni 这个是正常情况

@openstack-test
Copy link
Author

@cuisongliu 怎么安装?难道不自动安装flannel这些组件吗?

@cuisongliu
Copy link
Collaborator

再安装一下cni 的镜像就可以

@openstack-test
Copy link
Author

@cuisongliu 可以提供下命令吗,官网文档没找到有

@cuisongliu
Copy link
Collaborator

sealos run labring/calico:v3.22.1

@openstack-test
Copy link
Author

@cuisongliu https://www.sealos.io/zh-Hans/docs/getting-started/kuberentes-life-cycle 老哥提个小建议,完善下官网文档吧。单节点安装命令:

sealos run kubernetes:v1.25.0 --single

有2处错误,1是镜像地址不全会失败;2是缺少部署cni组件

@openstack-test
Copy link
Author

还有第3处错误。即不能使用这个文档 https://www.sealos.io/zh-Hans/docs/getting-started/installation 安装的sealos 4.0.0 版本。否则会报错提示无效的 --single参数

@openstack-test
Copy link
Author

第三处问题,见 #1659 部署v1.25.0, 需要使用v4.1.0-rc3 版本,建议说明清楚使用版本。谢谢

@fanux
Copy link
Member

fanux commented Aug 31, 2022

感谢反馈 这就修改

@fanux fanux closed this as completed Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants