下级集群注册到集群不成功,提示“Waiting for API to be available”

Rancher Server 设置

  • Rancher 版本:v2.7.5
  • 安装选项 (Docker install/Helm Chart): helm chart
    • 如果是 Helm Chart 安装,需要提供 Local 集群的类型(RKE1, RKE2, k3s, EKS, 等)和版本:RKE1 1.3.10
  • 在线或离线部署:在线

下游集群信息

  • Kubernetes 版本: 1.22.9
  • Cluster Type (Local/Downstream):
    • 如果 Downstream,是什么类型的集群?(自定义/导入或为托管 等):

用户信息

  • 登录用户的角色是什么? (管理员/集群所有者/集群成员/项目所有者/项目成员/自定义):管理员
    • 如果自定义,自定义权限集:

主机操作系统:ubuntu 20.04

问题描述:
在内网中使用RKE1.3.10创建了两个集群,集群1安装了Rancher UI,使用改hosts的方式实现使用域名访问。将集群2导入后界面一直停在Waiting for API to be available


集群2的agent已经正常running,pod状态如下:

agent 日志如下

网络说明
集群1的访问入口是nginx,nginx将https请求转到集群的ingress,集群2和其他客户端通过改hosts的方式使用域名访问,请求到集群1的nginx
集群2的agent deployment增加了hostAliases配置:
image

日志


你的配置操作没任何问题,但我猜问题应该出现在兼容性上了,rancher 2.7.5 不支持 1.22 的 K8s,参考:Release v2.7.5 · rancher/rancher · GitHub

1 个赞

感谢,我换版本试一下。

感谢,更换rancher2.6.13版本后正常了。
不过用的证书还是CA机构信任的证书。如果用自签的服务证书,就会提示

"Certificate chain is not complete, please check if all needed intermediate certificates are included in the server certificate (in the correct order) and if the cacerts setting in Rancher either contains the correct CA certificate (in the case of using self signed certificates) or is empty (in the case of using a certificate signed by a recognized CA). Certificate information is displayed above. error: Get \"https://abis.miaxis.com\": x509: certificate signed by unknown authority"

那就得看你的 rancher ha 是如何搭建的以及如何配置的证书,还有下游集群如何注册到 rancher 的