TimeBye / kubeadm-ha

kubeadm-ha 使用 kubeadm 进行高可用 kubernetes 集群搭建,利用 ansible-playbook 实现自动化安装,既提供一键安装脚本,也可以根据 playbook 分步执行安装各个组件。
Other
607 stars 298 forks source link

Centos7.9安装失败 临时启动 kubelet 以引导 etcd 运行 #141

Closed wangdzhao closed 1 year ago

wangdzhao commented 1 year ago

卡到了etcd这一步

TASK [etcd/install : 临时启动 kubelet 以引导 etcd 运行] *** changed: [10.10.25.202] changed: [10.10.25.201] changed: [10.10.25.200] included: /download/kubeadm-ha/roles/etcd/install/tasks/containerd.yml for 10.10.25.200, 10.10.25.202, 10.10.25.201 FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (12 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (12 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (12 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (11 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (11 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (11 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (10 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (10 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (10 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (9 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (9 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (9 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (8 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (8 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (8 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (7 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (7 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (7 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (6 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (6 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (6 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (5 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (5 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (5 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (4 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (4 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (4 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (3 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (3 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (3 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (2 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (2 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (2 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (1 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (1 retries left). FAILED - RETRYING: 以轮询的方式等待 etcd 运行完成 (1 retries left).

TASK [etcd/install : 以轮询的方式等待 etcd 运行完成] ***** fatal: [10.10.25.201]: FAILED! => {"attempts": 12, "changed": true, "cmd": "ctr -n k8s.io run --net-host --env ETCDCTL_API=3 --mount type=bind,src=/etc/kubernetes/pki/etcd,dst=/etc/kubernetes/pki/etcd,options=rbind:ro --rm registry.aliyuncs.com/kubeadm-ha/etcd:3.5.7-0 etcd-health-check etcdctl endpoint health --endpoints=https://[127.0.0.1]:2379 --cacert=/etc/kubernetes/pki/etcd/ca.crt --key=/etc/kubernetes/pki/etcd/healthcheck-client.key --cert=/etc/kubernetes/pki/etcd/healthcheck-client.crt\n", "delta": "0:00:05.196222", "end": "2023-11-03 15:38:26.583413", "msg": "non-zero return code", "rc": 1, "start": "2023-11-03 15:38:21.387191", "stderr": "{\"level\":\"warn\",\"ts\":\"2023-11-03T07:38:26.547Z\",\"logger\":\"client\",\"caller\":\"v3@v3.5.7/retry_interceptor.go:62\",\"msg\":\"retrying of unary invoker failed\",\"target\":\"etcd-endpoints://0xc000392a80/[127.0.0.1]:2379\",\"attempt\":0,\"error\":\"rpc error: code = DeadlineExceeded desc = context deadline exceeded\"}\nhttps://[127.0.0.1]:2379 is unhealthy: failed to commit proposal: context deadline exceeded\nError: unhealthy cluster", "stderr_lines": ["{\"level\":\"warn\",\"ts\":\"2023-11-03T07:38:26.547Z\",\"logger\":\"client\",\"caller\":\"v3@v3.5.7/retry_interceptor.go:62\",\"msg\":\"retrying of unary invoker failed\",\"target\":\"etcd-endpoints://0xc000392a80/[127.0.0.1]:2379\",\"attempt\":0,\"error\":\"rpc error: code = DeadlineExceeded desc = context deadline exceeded\"}", "https://[127.0.0.1]:2379 is unhealthy: failed to commit proposal: context deadline exceeded", "Error: unhealthy cluster"], "stdout": "", "stdout_lines": []} fatal: [10.10.25.202]: FAILED! => {"attempts": 12, "changed": true, "cmd": "ctr -n k8s.io run --net-host --env ETCDCTL_API=3 --mount type=bind,src=/etc/kubernetes/pki/etcd,dst=/etc/kubernetes/pki/etcd,options=rbind:ro --rm registry.aliyuncs.com/kubeadm-ha/etcd:3.5.7-0 etcd-health-check etcdctl endpoint health --endpoints=https://[127.0.0.1]:2379 --cacert=/etc/kubernetes/pki/etcd/ca.crt --key=/etc/kubernetes/pki/etcd/healthcheck-client.key --cert=/etc/kubernetes/pki/etcd/healthcheck-client.crt\n", "delta": "0:00:05.200239", "end": "2023-11-03 15:38:27.179749", "msg": "non-zero return code", "rc": 1, "start": "2023-11-03 15:38:21.979510", "stderr": "{\"level\":\"warn\",\"ts\":\"2023-11-03T07:38:27.137Z\",\"logger\":\"client\",\"caller\":\"v3@v3.5.7/retry_interceptor.go:62\",\"msg\":\"retrying of unary invoker failed\",\"target\":\"etcd-endpoints://0xc000534380/[127.0.0.1]:2379\",\"attempt\":0,\"error\":\"rpc error: code = DeadlineExceeded desc = context deadline exceeded\"}\nhttps://[127.0.0.1]:2379 is unhealthy: failed to commit proposal: context deadline exceeded\nError: unhealthy cluster", "stderr_lines": ["{\"level\":\"warn\",\"ts\":\"2023-11-03T07:38:27.137Z\",\"logger\":\"client\",\"caller\":\"v3@v3.5.7/retry_interceptor.go:62\",\"msg\":\"retrying of unary invoker failed\",\"target\":\"etcd-endpoints://0xc000534380/[127.0.0.1]:2379\",\"attempt\":0,\"error\":\"rpc error: code = DeadlineExceeded desc = context deadline exceeded\"}", "https://[127.0.0.1]:2379 is unhealthy: failed to commit proposal: context deadline exceeded", "Error: unhealthy cluster"], "stdout": "", "stdout_lines": []} fatal: [10.10.25.200]: FAILED! => {"attempts": 12, "changed": true, "cmd": "ctr -n k8s.io run --net-host --env ETCDCTL_API=3 --mount type=bind,src=/etc/kubernetes/pki/etcd,dst=/etc/kubernetes/pki/etcd,options=rbind:ro --rm registry.aliyuncs.com/kubeadm-ha/etcd:3.5.7-0 etcd-health-check etcdctl endpoint health --endpoints=https://[127.0.0.1]:2379 --cacert=/etc/kubernetes/pki/etcd/ca.crt --key=/etc/kubernetes/pki/etcd/healthcheck-client.key --cert=/etc/kubernetes/pki/etcd/healthcheck-client.crt\n", "delta": "0:00:05.240278", "end": "2023-11-03 15:38:29.136968", "msg": "non-zero return code", "rc": 1, "start": "2023-11-03 15:38:23.896690", "stderr": "{\"level\":\"warn\",\"ts\":\"2023-11-03T07:38:29.085Z\",\"logger\":\"client\",\"caller\":\"v3@v3.5.7/retry_interceptor.go:62\",\"msg\":\"retrying of unary invoker failed\",\"target\":\"etcd-endpoints://0xc00033ca80/[127.0.0.1]:2379\",\"attempt\":0,\"error\":\"rpc error: code = DeadlineExceeded desc = context deadline exceeded\"}\nhttps://[127.0.0.1]:2379 is unhealthy: failed to commit proposal: context deadline exceeded\nError: unhealthy cluster", "stderr_lines": ["{\"level\":\"warn\",\"ts\":\"2023-11-03T07:38:29.085Z\",\"logger\":\"client\",\"caller\":\"v3@v3.5.7/retry_interceptor.go:62\",\"msg\":\"retrying of unary invoker failed\",\"target\":\"etcd-endpoints://0xc00033ca80/[127.0.0.1]:2379\",\"attempt\":0,\"error\":\"rpc error: code = DeadlineExceeded desc = context deadline exceeded\"}", "https://[127.0.0.1]:2379 is unhealthy: failed to commit proposal: context deadline exceeded", "Error: unhealthy cluster"], "stdout": "", "stdout_lines": []}

NO MORE HOSTS LEFT ***

PLAY RECAP *** 10.10.25.200 : ok=117 changed=33 unreachable=0 failed=1 skipped=45 rescued=0 ignored=1
10.10.25.201 : ok=88 changed=25 unreachable=0 failed=1 skipped=37 rescued=0 ignored=1
10.10.25.202 : ok=88 changed=25 unreachable=0 failed=1 skipped=37 rescued=0 ignored=1

wangdzhao commented 1 year ago

看到master和2个node上的etcd都是启动好的

[root@master kubeadm-ha]# netstat -tulnp | grep 2379 tcp 1 0 127.0.0.1:2379 0.0.0.0: LISTEN 116713/etcd
tcp 0 0 10.10.25.200:2379 0.0.0.0:
LISTEN 116713/etcd
[root@master kubeadm-ha]#