Rancher 2.6 local集群安装报错

Rancher Server 设置

  • Rancher 版本:2.6.8
  • 安装选项 (Docker install/Helm Chart): Docker install docker 版本 docker-ce-20.10.18-3.el7
    • 如果是 Helm Chart 安装,需要提供 Local 集群的类型(RKE1, RKE2, k3s, EKS, 等)和版本:
  • 在线或离线部署: 在线单节点部署

sudo docker run -d --restart=unless-stopped -p 8090:80 -p 6443:443 -v /home/rancher/data:/var/lib/rancher/ -v /home/rancher/auditlog:/var/log/auditlog --privileged -e CATTLE_SYSTEM_DEFAULT_REGISTRY=registry.cn-hangzhou.aliyuncs.com -e CATTLE_AGENT_IMAGE=“registry.cn-hangzhou.aliyuncs.com/rancher/rancher-agent:v2.6.8registry.cn-hangzhou.aliyuncs.com/rancher/rancher:v2.6.8

下游集群信息

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

用户信息

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

主机操作系统: centos 7.9

问题描述: local节点报错 helm-operation-xxx 一直重启报错

重现步骤:

结果:

预期结果:

截图:

其他上下文信息:

日志
2022/10/19 06:13:31 [INFO] namespaceHandler: addProjectIDLabelToNamespace: adding label field.cattle.io/projectId=p-jndg6 to namespace=default
2022/10/19 06:13:31 [INFO] namespaceHandler: addProjectIDLabelToNamespace: adding label field.cattle.io/projectId=p-bp7hs to namespace=kube-public
2022/10/19 06:13:31 [ERROR] namespaceHandler: Sync: error adding project id label to namespace err=Operation cannot be fulfilled on namespaces "cattle-global-data": the object has been modified; please apply your changes to the latest version and try again
2022/10/19 06:13:31 [ERROR] defaultSvcAccountHandler: Sync: error handling default ServiceAccount of namespace key=cattle-global-nt, err=Operation cannot be fulfilled on namespaces "cattle-global-nt": the object has been modified; please apply your changes to the latest version and try again
2022/10/19 06:13:31 [ERROR] defaultSvcAccountHandler: Sync: error handling default ServiceAccount of namespace key=p-bp7hs, err=Operation cannot be fulfilled on namespaces "p-bp7hs": the object has been modified; please apply your changes to the latest version and try again
2022/10/19 06:13:32 [ERROR] namespaceHandler: Sync: error adding project id label to namespace err=Operation cannot be fulfilled on namespaces "cattle-global-nt": the object has been modified; please apply your changes to the latest version and try again
2022/10/19 06:13:32 [ERROR] namespaceHandler: Sync: error adding project id label to namespace err=Operation cannot be fulfilled on namespaces "kube-public": the object has been modified; please apply your changes to the latest version and try again
2022/10/19 06:13:32 [INFO] namespaceHandler: addProjectIDLabelToNamespace: adding label field.cattle.io/projectId=p-bp7hs to namespace=cattle-global-data
2022/10/19 06:13:32 [ERROR] defaultSvcAccountHandler: Sync: error handling default ServiceAccount of namespace key=p-jndg6, err=Operation cannot be fulfilled on namespaces "p-jndg6": the object has been modified; please apply your changes to the latest version and try again
2022/10/19 06:13:32 [INFO] namespaceHandler: addProjectIDLabelToNamespace: adding label field.cattle.io/projectId=p-bp7hs to namespace=kube-public
2022/10/19 06:13:32 [INFO] namespaceHandler: addProjectIDLabelToNamespace: adding label field.cattle.io/projectId=p-bp7hs to namespace=cattle-global-nt
2022/10/19 06:13:32 [INFO] namespaceHandler: addProjectIDLabelToNamespace: adding label field.cattle.io/projectId=p-bp7hs to namespace=kube-system
2022/10/19 06:13:32 [ERROR] namespaceHandler: Sync: error adding project id label to namespace err=Operation cannot be fulfilled on namespaces "kube-public": the object has been modified; please apply your changes to the latest version and try again
2022/10/19 06:13:32 [ERROR] namespaceHandler: Sync: error adding project id label to namespace err=Operation cannot be fulfilled on namespaces "kube-system": the object has been modified; please apply your changes to the latest version and try again
2022/10/19 06:13:34 [ERROR] defaultSvcAccountHandler: Sync: error handling default ServiceAccount of namespace key=fleet-local, err=Operation cannot be fulfilled on namespaces "fleet-local": the object has been modified; please apply your changes to the latest version and try again
2022/10/19 06:13:34 [ERROR] defaultSvcAccountHandler: Sync: error handling default ServiceAccount of namespace key=fleet-default, err=Operation cannot be fulfilled on namespaces "fleet-default": the object has been modified; please apply your changes to the latest version and try again
2022/10/19 06:13:34 [ERROR] defaultSvcAccountHandler: Sync: error handling default ServiceAccount of namespace key=p-jndg6, err=Operation cannot be fulfilled on namespaces "p-jndg6": the object has been modified; please apply your changes to the latest version and try again
2022/10/19 06:13:34 [INFO] [mgmt-auth-crtb-controller] Creating roleBinding for subject u-b4qkhsnliz with role cluster-owner in namespace p-bp7hs
2022/10/19 06:13:34 [ERROR] defaultSvcAccountHandler: Sync: error handling default ServiceAccount of namespace key=kube-node-lease, err=Operation cannot be fulfilled on namespaces "kube-node-lease": the object has been modified; please apply your changes to the latest version and try again
2022/10/19 06:13:34 [ERROR] defaultSvcAccountHandler: Sync: error handling default ServiceAccount of namespace key=fleet-local, err=Operation cannot be fulfilled on namespaces "fleet-local": the object has been modified; please apply your changes to the latest version and try again

2022/10/19 06:16:38 [ERROR] Failed to install system chart fleet: pod cattle-system/helm-operation-gfr9d failed, watch closed
2022/10/19 06:17:29 [ERROR] Error during subscribe websocket: close sent
2022/10/19 06:17:29 [ERROR] Error during subscribe websocket: close sent
2022/10/19 06:17:40 [ERROR] Failed to install system chart fleet-crd: pod cattle-system/helm-operation-m8thp failed, watch closed
2022/10/19 06:18:42 [ERROR] Failed to install system chart fleet-crd: pod cattle-system/helm-operation-cgp6q failed, watch closed
2022/10/19 06:19:44 [ERROR] Failed to install system chart fleet: pod cattle-system/helm-operation-8p49h failed, watch closed
2022/10/19 06:20:47 [ERROR] Failed to install system chart fleet-crd: pod cattle-system/helm-operation-2fvh4 failed, watch closed
2022/10/19 06:21:49 [ERROR] Failed to install system chart fleet: pod cattle-system/helm-operation-dwst9 failed, watch closed
2022/10/19 06:22:51 [ERROR] Failed to install system chart fleet-crd: pod cattle-system/helm-operation-xvqhp failed, watch closed
2022/10/19 06:23:53 [ERROR] Failed to install system chart fleet: pod cattle-system/helm-operation-ttd8w failed, watch closed
Failed to install system chart fleet2022/10/19 06:24:55 [ERROR] Failed to install system chart fleet-crd: pod cattle-system/helm-operation-ztfb4 failed, watch closed
2022/10/19 06:25:57 [ERROR] Failed to install system chart fleet: pod cattle-system/helm-operation-4p85w failed, watch closed
2022/10/19 06:27:00 [ERROR] Failed to install system chart fleet-crd: pod cattle-system/helm-operation-kw6z4 failed, watch closed
2022/10/19 06:28:02 [ERROR] Failed to install system chart fleet: pod cattle-system/helm-operation-2dm66 failed, watch closed
2022/10/19 06:29:04 [ERROR] Failed to install system chart fleet: pod cattle-system/helm-operation-wzkrm failed, watch closed
2022/10/19 06:30:06 [ERROR] Failed to install system chart fleet-crd: pod cattle-system/helm-operation-ffg7x failed, watch closed
2022/10/19 06:31:09 [ERROR] Failed to install system chart fleet: pod cattle-system/helm-operation-ncxn6 failed, watch closed
2022/10/19 06:32:11 [ERROR] Failed to install system chart fleet-crd: pod cattle-system/helm-operation-9xpzb failed, watch closed
2022/10/19 06:33:13 [ERROR] Failed to install system chart fleet: pod cattle-system/helm-operation-6v548 failed, watch closed
2022/10/19 06:34:15 [ERROR] Failed to install system chart fleet-crd: pod cattle-system/helm-operation-4n7gd failed, watch closed
2022/10/19 06:35:17 [ERROR] Failed to install system chart rancher-webhook: pod cattle-system/helm-operation-cvfkd failed, watch closed
2022/10/19 06:36:20 [ERROR] Failed to install system chart rancher-webhook: pod cattle-system/helm-operation-6pt97 failed, watch closed
2022/10/19 06:37:22 [ERROR] Failed to install system chart fleet: pod cattle-system/helm-operation-pssxt failed, watch closed
2022/10/19 06:38:24 [ERROR] Failed to install system chart fleet-crd: pod cattle-system/helm-operation-bhqq8 failed, watch closed
 Failed to install system chart rancher-webhook2022/10/19 06:39:26 [ERROR] Failed to install system chart fleet: pod cattle-system/helm-operation-rrvdk failed, watch closed
2022/10/19 06:40:28 [ERROR] Failed to install system chart fleet-crd: pod cattle-system/helm-operation-dxw9l failed, watch closed
2022/10/19 06:41:31 [ERROR] Failed to install system chart rancher-webhook: pod cattle-system/helm-operation-wrf5v failed, watch closed
2022/10/19 06:42:33 [ERROR] Failed to install system chart fleet: pod cattle-system/helm-operation-gbc24 failed, watch closed

如上图,如果已安装应用里面包含这 4 个应用,并且状态正常,那就是不影响使用

这个报错,十有八九是因为镜像没拉下来导致的,你可以看看 log。

这4个没有安装成功,把操作系统还原了 也安装不成功,换了一台操作系统一样的就安装成功了