gpt4 book ai didi

kubernetes - 恢复Rancher时出错:该群集当前不可用;在API准备就绪之前,与之直接交互的区域将不可用

转载 作者:行者123 更新时间:2023-12-02 12:31:39 28 4
gpt4 key购买 nike

我正在尝试备份和还原rancher服务器(单节点安装),作为链接:https://rancher.com/docs/rancher/v2.x/en/backups/backups/single-node-backups/

备份后,我尝试关闭rancher服务器节点,并在新节点(在同一网络中,但使用另一个IP地址)上的新节点上运行新的rancher容器,然后使用备份文件作为链接https://rancher.com/docs/rancher/v2.x/en/backups/restorations/single-node-restoration/进行还原

恢复后,我登录到牧场者UI,它显示以下错误

enter image description here

因此,我检查了牧场服务器的日志,它显示如下:

2019-10-05 16:41:32.197641 I | http: TLS handshake error from 127.0.0.1:38388: EOF 2019-10-05 16:41:32.202442 I | http: TLS handshake error from 127.0.0.1:38380: EOF 2019-10-05 16:41:32.210378 I | http: TLS handshake error from 127.0.0.1:38376: EOF 2019-10-05 16:41:32.211106 I | http: TLS handshake error from 127.0.0.1:38386: EOF 2019/10/05 16:42:26 [ERROR] ClusterController c-4pgjl [user-controllers-controller] failed with : failed to start user controllers for cluster c-4pgjl: failed to contact server: Get https://192.168.94.154:6443/api/v1/namespaces/kube-system?timeout=30s: waiting for cluster agent to connect 2019/10/05 16:44:34 [ERROR] ClusterController c-4pgjl [user-controllers-controller] failed with : failed to start user controllers for cluster c-4pgjl: failed to contact server: Get https://192.168.94.154:6443/api/v1/namespaces/kube-system?timeout=30s: waiting for cluster agent to connect 2019/10/05 16:48:50 [ERROR] ClusterController c-4pgjl [user-controllers-controller] failed with : failed to start user controllers for cluster c-4pgjl: failed to contact server: Get https://192.168.94.154:6443/api/v1/namespaces/kube-system?timeout=30s: waiting for cluster agent to connect 2019-10-05 16:50:19.114475 I | mvcc: store.index: compact 75951 2019-10-05 16:50:19.137825 I | mvcc: finished scheduled compaction at 75951 (took 22.527694ms) 2019-10-05 16:55:19.120803 I | mvcc: store.index: compact 76282 2019-10-05 16:55:19.124813 I | mvcc: finished scheduled compaction at 76282 (took 2.746382ms)



之后,我检查了主节点的日志,发现rancher代理仍尝试连接到旧rancher服务器(旧ip地址),而不是连接到新的rancher服务器,因此它使群集不可用

我怎样才能解决这个问题 ?

最佳答案

您需要使用以下步骤在Rancher中重新注册该节点。

  • 转到全局->设置->服务器URL,更新Rancher中的服务器URL。
    这应该是带有https://
  • 的完整URL
  • 然后使用此脚本在Rancher中重新注册节点https://github.com/mattmattox/cluster-agent-tool
  • 关于kubernetes - 恢复Rancher时出错:该群集当前不可用;在API准备就绪之前,与之直接交互的区域将不可用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58253436/

    28 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com