【问题标题】:What might cause the Kubernetes API server to fail to write the client CA configmap?什么可能导致 Kubernetes API 服务器无法写入客户端 CA configmap?
【发布时间】:2018-04-14 03:55:04
【问题描述】:

我遇到 Kubernetes API 服务器在集群引导期间无法启动并出现以下错误日志,显然是由于无法初始化其“客户端 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

【问题讨论】:

  • 需要修复您的日志链接。
  • @johnharris85 啊谢谢!
  • 与 etcd 的网络连接?您的集群拱形是什么样的?
  • 感谢您对@johnharris85 感兴趣!我想知道 apiserver 是否可以自己连接到 etcd。你知道如何测试从 apiserver(master)节点到 etcd 集群的连通性吗?关于集群拱门,我将我的 Tectonic Installer 端口用于 DigitalOcean:github.com/aknuds1/tectonic-installer/tree/digitalocean。如果您需要我的更多信息,请告诉我!
  • @johnharris85 我从测试中发现,我确实无法从我的主节点访问 etcd,即使它可以在其中一台 etcd 成员机器上运行。我在我的问题中添加了这方面的信息。

标签: go certificate kubernetes certificate-authority


【解决方案1】:

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

感谢 @johnharris85 提出 etcd 连接存在问题!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-09-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多