创建 Kubernetes 集群,ETCD 无法启动 # x509: certificate signed by unknown authority
通过rek创建k8s集群时,集群状态为Provisioning,并且 UI 显示如下错误信息:[etcd] Failed to bring up Etcd Plane: etcd cluster is unhealthy: hosts [10.0.2.15] failed to report healthy. Check etcd container logs on each host for m
·
通过rek创建k8s集群时,集群状态为Provisioning
,并且 UI 显示如下错误信息:
[etcd] Failed to bring up Etcd Plane: etcd cluster is unhealthy: hosts [10.0.2.15] failed to report healthy. Check etcd container logs on each host for more information
查看 etcd 日志,显示如下错误信息:
docekr exec -it [容器ID] /bin/bash
2020-05-25 08:43:41.515364 I | embed: ready to serve client requests
2020-05-25 08:43:41.523589 I | embed: serving client requests on [::]:2379
2020-05-25 08:43:41.536538 I | embed: rejected connection from "10.0.2.15:39550" (error "tls: failed to verify client's certificate: x509: certificate signed by unknown authority (possibly because of \"crypto/rsa: verification error\" while trying to verify candidate authority certificate \"kube-ca\")", ServerName "")
2020-05-25 08:43:46.545930 I | embed: rejected connection from "10.0.2.15:39554" (error "tls: failed to verify client's certificate: x509: certificate signed by unknown authority (possibly because of \"crypto/rsa: verification error\" while trying to verify candidate authority certificate \"kube-ca\")", ServerName "")
2020-05-25 08:43:51.554070 I | embed: rejected connection from "10.0.2.15:39556" (error "tls: failed to verify client's certificate: x509: certificate signed by unknown authority (possibly because of \"crypto/rsa: verification error\" while trying to verify candidate authority certificate \"kube-ca\")", ServerName "")
2020-05-25 08:44:34.072012 I | embed: rejected connection from "10.0.2.15:39703" (error "EOF", ServerName "")
2020-05-25 08:44:46.520865 I | embed: rejected connection from "10.0.2.15:39560" (error "tls: failed to verify client's certificate: x509: certificate signed by unknown authority (possibly because of \"crypto/rsa: verification error\" while trying to verify candidate authority certificate \"kube-ca\")", ServerName "")
以上报错是因为证书的问题,导致 etcd 启动失败。原因主要有两种可能:
- 主机时钟不同步
- 该主机之前添加过 kubernetes 集群,在残留数据没有清理干净的情况下重新安装集群。
解决办法:
- 检查主机时钟,并使各主机时钟同步。
- 将主机数据残留数据清理干净,然后再从新添加集群。
更多推荐
已为社区贡献1条内容
所有评论(0)