【问题标题】:Kubernetes: Calio not working on remote worker, local okKubernetes:Calio 不在远程工作人员上工作,本地工作正常
【发布时间】:2021-05-22 11:51:49
【问题描述】:

我使用 calico 设置了一个 Kubernetes 集群。 设置很“简单”

  • 1x 主机(本地网络,正常)
  • 1x 节点(本地网络,正常)
  • 1x 节点(云服务器,不行)

所有带有 docker 19.03 的 debian buster

在云服务器上,calico pod 没有出现:

calico-kube-controllers-token-x:

    Events:
  Type     Reason          Age                   From     Message
  ----     ------          ----                  ----     -------
  Normal   SandboxChanged  47m (x50 over 72m)    kubelet  Pod sandbox changed, it will be killed and re-created.
  Warning  FailedMount     43m                   kubelet  MountVolume.SetUp failed for volume "calico-kube-controllers-token-x" : failed to sync secret cache: timed out waiting for the condition
  Normal   SandboxChanged  3m41s (x78 over 43m)  kubelet  Pod sandbox changed, it will be killed and re-created.

calico-node-x:

      Warning  Unhealthy       43m (x5 over 43m)      kubelet  Liveness probe failed: calico/node is not ready: Felix is not live: Get "http://localhost:9099/liveness": dial tcp [::1]:9099: connect: connection refused
  Warning  Unhealthy       14m (x77 over 43m)     kubelet  Readiness probe failed: calico/node is not ready: BIRD is not ready: Error querying BIRD: unable to connect to BIRDv4 socket: dial unix /var/run/bird/bird.ctl: connect: no such file or directory
  Warning  BackOff         4m26s (x115 over 39m)  kubelet  Back-off restarting failed container

我的猜测是 IP/网络配置有问题,但没有弄清楚是哪一个。

  • 需要的端口(k8s&BGP)是从路由器转发的,也试过master直连互联网
  • --control-plane-endpoint 是一个主机名,可公开解析
  • Calico 正在使用 BGP 对等互连(使用公共 ip 作为对等体)

这个条目确实让我最担心:

  • 显示本地ip:kubectl get --raw /api

我试图找到一种方法将其更改为master的公共IP,但没有成功。

有人知道接下来要尝试什么吗?

【问题讨论】:

    标签: kubernetes project-calico bgp


    【解决方案1】:

    在花费额外的时间进行分析之后,问题恰好是分布式 api ip 地址是本地的,而不是 dns 名称。

    创建了一个从云节点到本地master的带有wireguard的vpn,所以master的本地ip可以从云节点访问。

    不知道这是否是最干净的解决方案,但它有效。

    【讨论】:

      猜你喜欢
      • 2014-12-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-27
      相关资源
      最近更新 更多