创建 k8s 集群后,agent无法启动

Rancher Server 设置

  • Rancher 版本:latest
  • 安装选项 (Docker install/Helm Chart): Helm k3s
  • 在线或离线部署:在线

下游集群信息

  • Kubernetes 版本: v1.27.12+rke2r1
  • Cluster Type (Local/Downstream): Downstream 自定义

用户信息

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

主机操作系统:
ubuntu 22

问题描述:
已安装完成 rancher,现在创建新的集群,
在另外一台新的 vm 运行 Registration 给的命令

[INFO ] configuring bootstrap node(s) custom-844f99617672: waiting for agent to check in and apply initial plan

目标 VM 日志

Apr 20 20:19:42 WormCloud-CP systemd[1]: rancher-system-agent.service: Scheduled restart job, restart counter is at 24.
Apr 20 20:19:42 WormCloud-CP systemd[1]: Started rancher-system-agent.service - Rancher System Agent.
Apr 20 20:19:42 WormCloud-CP rancher-system-agent[226631]: time="2024-04-20T20:19:42Z" level=info msg="Rancher System Agent version v0.3.4 (63eb11a) is starting"
Apr 20 20:19:42 WormCloud-CP rancher-system-agent[226631]: time="2024-04-20T20:19:42Z" level=info msg="Using directory /var/lib/rancher/agent/work for work"
Apr 20 20:19:42 WormCloud-CP rancher-system-agent[226631]: time="2024-04-20T20:19:42Z" level=info msg="Starting remote watch of plans"
Apr 20 20:19:42 WormCloud-CP rancher-system-agent[226631]: time="2024-04-20T20:19:42Z" level=fatal msg="error while connecting to Kubernetes cluster: an error on the server (\"invalid upgrade response: status code 200\") has prevented the request from succeeding"
Apr 20 20:19:42 WormCloud-CP systemd[1]: rancher-system-agent.service: Main process exited, code=exited, status=1/FAILURE
Apr 20 20:19:42 WormCloud-CP systemd[1]: rancher-system-agent.service: Failed with result 'exit-code'.
Apr 20 20:19:47 WormCloud-CP systemd[1]: rancher-system-agent.service: Scheduled restart job, restart counter is at 25.
Apr 20 20:19:47 WormCloud-CP systemd[1]: Started rancher-system-agent.service - Rancher System Agent.
Apr 20 20:19:47 WormCloud-CP rancher-system-agent[226652]: time="2024-04-20T20:19:47Z" level=info msg="Rancher System Agent version v0.3.4 (63eb11a) is starting"
Apr 20 20:19:47 WormCloud-CP rancher-system-agent[226652]: time="2024-04-20T20:19:47Z" level=info msg="Using directory /var/lib/rancher/agent/work for work"
Apr 20 20:19:47 WormCloud-CP rancher-system-agent[226652]: time="2024-04-20T20:19:47Z" level=info msg="Starting remote watch of plans"
Apr 20 20:19:47 WormCloud-CP rancher-system-agent[226652]: time="2024-04-20T20:19:47Z" level=fatal msg="error while connecting to Kubernetes cluster: an error on the server (\"invalid upgrade response: status code 200\") has prevented the request from succeeding"
Apr 20 20:19:47 WormCloud-CP systemd[1]: rancher-system-agent.service: Main process exited, code=exited, status=1/FAILURE
Apr 20 20:19:47 WormCloud-CP systemd[1]: rancher-system-agent.service: Failed with result 'exit-code'.

vm都是全新安装,如何定位什么问题

得看下游集群节点的 rancher-system-agent 日志