什么可能导致 Kubernetes API 服务器无法写入客户端 CA configmap?

What might cause the Kubernetes API server to fail to write the client CA configmap?

我遇到 Kubernetes API 服务器在集群引导期间无法启动并显示以下错误日志,显然是由于无法初始化其 "client CA configmap":

E1029 14:35:56.211083       5 client_ca_hook.go:78] Timeout: request did not complete within allowed duration
F1029 14:35:56.211121       5 hooks.go:126] PostStartHook “ca-registration” failed: unable to initialize client CA configmap: timed out waiting for the condition

它似乎发生在 Kubernetes 源代码中 here。什么可能导致此错误?

查看完整日志 here

更新: 似乎我的 etcd 集群无法从主节点访问,即使相同的命令在 etcd 成员机器上有效:

$ sudo ETCDCTL_API=3 etcdctl --cacert=/opt/tectonic/tls/etcd-client-ca.crt \
--cert=/opt/tectonic/tls/etcd-client.crt --key=/opt/tectonic/tls/etcd-client.key \
--endpoints=https://coreos-testing-etcd-0.socialfoodie.club:2379 \
endpoint health
https://coreos-testing-etcd-0.socialfoodie.club:2379 is unhealthy: failed to connect: grpc: timed out when dialing
Error:  unhealthy cluster

我发现尽管 API 服务器中出现了神秘的错误消息,但原因是它无法写入 etcd 集群。原因是 API 服务器配置了与 etcd 集群不同的客户端证书颁发机构,这是由于 wrt 的时间问题。在我的 Terraform 集群设置中复制证书。我发现 CA 是通过使用 curl 联系 etcd 集群而不是 etcdctl 的问题,因为它给出了明确的错误消息。

感谢@johnharris85 建议 etcd 连接是一个问题!