【问题标题】:Kubeadm join a new master node fails because of "Initial timeout of 40s passed"Kubeadm 加入一个新的主节点失败,因为“Initial timeout of 40s passed”
【发布时间】:2021-04-08 10:16:10
【问题描述】:

我有一个主节点,它工作正常。当我得到节点时,它给了我一个主节点 现在我想使用以下命令添加一个新的主节点:

kubeadm join 45.82.137.112:8443 --token 61vi23.i1qy9k2hvqc9k8ib --discovery-token-ca-cert-hash sha256:40617af1ebd8893c1df42f2d26c5f18e05be91b4e2c9b69adbeab1edff7a51ab  --control-plane --certificate-key 4aafd2369fa85eb2feeacd69a7d1cfe683771181e3ee781ce806905b74705fe8

其中 45.82.137.112 是我的 HAProxy IP,我在创建第一个主节点后复制此命令。 执行此命令后,我收到以下错误:

[etcd] Announced new etcd member joining to the existing etcd cluster
[etcd] Creating static Pod manifest for "etcd"
[etcd] Waiting for the new etcd member to join the cluster. This can take up to 40s
[kubelet-check] Initial timeout of 40s passed.

我的第一个主节点也消失并失败了。 master1 中的一切都正常,直到我对另一个主节点使用 join 命令。

【问题讨论】:

  • 我也有这个错误。当我想添加一个新的主节点时,一切都被破坏了:((
  • 你的 kubeadm 版本是多少?
  • @mario 我的版本是最新的。 1.20
  • @mario 我的 kubeadm 版本也是 1.20

标签: kubernetes kubeadm


【解决方案1】:

兄弟,我的问题已经解决了,我的kubeadm版本是1.20.1 这是我的加入命令: kubeadm join 192.168.43.122:6444 \ --token 689yfz.w60ihod0js5zcina \ --discovery-token-ca-cert-hash sha256:532de9882f2b417515203dff99203d7d7f3dd00a88eb2e8f6cbf5ec998827537 \ --control-plane \ --certificate-key 8792f355dc22227029a091895adf9f84be6eea9e8e65f0da4ad510843e54fbcf \ --apiserver-advertise-address 192.168.43.123

我只是添加标志 --apiserver-advertise-address 192.168.43.123

【讨论】:

  • 我的linux有两个ip,一个内网ip 192.168.43.123和一个外网ip 192.168.1.119,默认情况下,kubeadm join会使用外网ip作为master ip,然后,第一个master etcd会消失并失败。
  • 浪费了这么多时间...谢谢!!
猜你喜欢
  • 2020-05-18
  • 2020-08-15
  • 2019-04-09
  • 2020-06-03
  • 2021-04-23
  • 2018-09-08
  • 2019-03-10
  • 2019-07-01
  • 2019-09-10
相关资源
最近更新 更多