Closed yingpwu closed 2 years ago
试了3遍都这样.....
你可以試試選擇k8s v1. 23
或以下版本的k8s
進行部署。
如果你安裝的是k8s 1.24
版本,也許會存在一些未知問題。 因為cncf官方還未發佈正式版本的k8s v1. 24
,所以k8s v1. 24
現時還處於測試階段,難免會存在不穩定。
k8s v1. 24
版本,建議等待kube-install v0.8.0正式版
發佈(此時cncf官方也發佈正式的k8s v1.24
版本)之後再進行。k8s v1. 23
或以下版本的k8s
進行部署。非常感谢你的回复,测试过1.23和1.24,都是一样的这个错误,每个机器上都有5个ignore,基本上都是关于service无法注册
凡是標記為ignoring
的都可以忽略。
(1)你看看日誌裡面是否還有其他沒有ignoring
的錯誤?
(2)你安裝的是什麼版本的k8s? cnicni挿件安裝的是什麼?
(3)你的機器是虛擬機器還是硬體服務器? 你的機器上是否以前就已經安裝過k8s或docker?
(4)是master和node都啟動不了? 還是只有node啟動不了,但是master正常。
kubectl get cs #查看master狀態
kubectl get node #查看node狀態
(5)如果docker或kubelet啟動不了,可以提供一下docker或kubelet的錯誤日誌資訊。
TASK [/root/kube-install/data/output/cluster/sys/0x0000000network/flannel : 1.Create cniplugin directory] *** changed: [10.10.10.50] => (item=flannel) changed: [10.10.10.50] => (item=calico) changed: [10.10.10.50] => (item=kuberouter) changed: [10.10.10.50] => (item=weave) changed: [10.10.10.50] => (item=cilium)
TASK [/root/kube-install/data/output/cluster/sys/0x0000000network/flannel : 2.Make docker options] *** fatal: [10.10.10.50]: FAILED! => {"changed": false, "checksum": "155274ebca961f16fb2cf9d87a3e66a540ec6c03", "msg": "Destination directory /opt/cni/bin does not exist"}
PLAY RECAP ***** 10.10.10.50 : ok=91 changed=81 unreachable=0 failed=1 skipped=0 rescued=0 ignored=3 10.10.10.51 : ok=73 changed=51 unreachable=0 failed=0 skipped=0 rescued=0 ignored=10 10.10.10.52 : ok=73 changed=51 unreachable=0 failed=0 skipped=0 rescued=0 ignored=10
0.7.3版本测试日志
机器是虚拟机,全新centos7系统 测试状态
[root@master4k8s ~]# kubectl get cs Warning: v1 ComponentStatus is deprecated in v1.19+ NAME STATUS MESSAGE ERROR scheduler Healthy ok etcd-0 Healthy {"health":"true"} controller-manager Healthy ok [root@master4k8s ~]# kubectl get nod error: the server doesn't have a resource type "nod" [root@master4k8s ~]# kubectl get node No resources found [root@master4k8s ~]# kubectl get pod No resources found in default namespace. [root@master4k8s ~]# kubectl run nginx --image=nginx pod/nginx created [root@master4k8s ~]# kubectl get pods NAME READY STATUS RESTARTS AGE nginx 0/1 Pending 0 15s [root@master4k8s ~]# ^C [root@master4k8s ~]# kubectl get pods NAME READY STATUS RESTARTS AGE nginx 0/1 Pending 0 46s [root@master4k8s ~]#
**TASK [/root/kube-install/data/output/cluster/sys/0x0000000network/flannel : 1.Create cniplugin directory] *** changed: [10.10.10.50] => (item=flannel) changed: [10.10.10.50] => (item=calico) changed: [10.10.10.50] => (item=kuberouter) changed: [10.10.10.50] => (item=weave) changed: [10.10.10.50] => (item=cilium)
TASK [/root/kube-install/data/output/cluster/sys/0x0000000network/flannel : 2.Make docker options] *** fatal: [10.10.10.50]: FAILED! => {"changed": false, "checksum": "155274ebca961f16fb2cf9d87a3e66a540ec6c03", "msg": "Destination directory /opt/cni/bin does not exist"}
Prompt that a directory ( /opt/cni/bin
) does not exist, so the installation is not successful.
This bug is already Fixed in v0.7.4
.
0.7.3版本测试日志
You can try v0.7.4
: https://github.com/cloudnativer/kube-install/releases/tag/v0.7.4
Installation documentation: https://github.com/cloudnativer/kube-install/blob/master/README0.7.md
如果是中國大陸的用戶,你還可以加入微信技術交流群,進一步溝通技術問題。
[root@master4k8s ~]# kubectl get node No resources found
這說明你的node不正常,所以導致nginx是Pending的。 如果docker或kubelet啟動不了,可以提供一下docker或kubelet的錯誤日誌資訊。
systemctl status docker -l
systemctl status kubelet -l
0.7.3版本测试日志
Both kube-install v0.7.4
and kube-install v0.8.*
versions are installed without this problem.
问题已解决,0.8.0beta安装1.24版本,1.24版本不支持docker. 如果依然想使用docker作为k8s的默认容器运行时,可以安装k8s 1.23或以下版本
TASK [/root/kube-install/data/output/cluster/sys/0x0000000000base/runtime : 1.Cleaning up garbage files left in history.] *** fatal: [10.10.10.52]: FAILED! => {"changed": false, "msg": "Could not find the requested service kubelet: host"} ...ignoring fatal: [10.10.10.51]: FAILED! => {"changed": false, "msg": "Could not find the requested service kubelet: host"} ...ignoring
TASK [/root/kube-install/data/output/cluster/sys/0x0000000000base/runtime : service] *** fatal: [10.10.10.52]: FAILED! => {"changed": false, "msg": "Could not find the requested service kube-proxy: host"} ...ignoring fatal: [10.10.10.51]: FAILED! => {"changed": false, "msg": "Could not find the requested service kube-proxy: host"} ...ignoring
TASK [/root/kube-install/data/output/cluster/sys/0x0000000000base/runtime : service] * fatal: [10.10.10.52]: FAILED! => {"changed": false, "msg": "Could not find the requested service containerd: host"} ...ignoring fatal: [10.10.10.51]: FAILED! => {"changed": false, "msg": "Could not find the requested service containerd: host"} ...ignoring ........................ PLAY RECAP *** 10.10.10.50 : ok=128 changed=115 unreachable=0 failed=0 skipped=0 rescued=0 ignored=5
10.10.10.51 : ok=85 changed=68 unreachable=0 failed=0 skipped=0 rescued=0 ignored=5
10.10.10.52 : ok=85 changed=68 unreachable=0 failed=0 skipped=0 rescued=0 ignored=5
[Info] 2022-01-09 08:41:26.594549917 -0500 EST m=+1013.176189743 Kubernetes cluster install completed!
系统上centos7 node上docker等service都启动不了 pod无法部署