Rancher Server 设置
- Rancher 版本:V2.6.5
- 安装选项:Helm Chart
- local 集群类型:k3s (版本v1.23.6+k3s1)
- 默认使用aliyun镜像
- 在线部署
下游集群信息
- Kubernetes 版本: rke2或k3s
用户信息
- 登录用户的角色:初始admin管理员
问题描述:
- 使用rancher创建rke2集群或k3s集群后,节点注册失败
重现步骤:
- 用rancher创建rke2或k3s集群(使用registry.cn-hangzhou.aliyuncs.com)
- 将Registration Command (角色包括master etcd worker)拷贝至第一个节点(ubuntu 20.04.4 LTS)运行
结果:
- rancher报错 error applying plan – check rancher-system-agent.service logs on node …
- 在节点查看rancher-system-agent.service的日志(见下方
日志
)
预期结果:
- 成功创建下游集群
截图:
其他上下文信息:
日志
level=info msg="[Applyinator] Extracting image registry.cn-hangzhou.aliyuncs.com/rancher/system-agent-installer-rke2:v1.23.7-rke2r2 to directory /var/lib/rancher/agent/work/20220617-034001/dca32c8e1254d24c2629802bf5749446b2dda0cbeed41918ea35006c3160df25_0"
level=info msg="Using private registry config file at /etc/rancher/agent/registries.yaml"
level=info msg="Pulling image registry.cn-hangzhou.aliyuncs.com/rancher/system-agent-installer-rke2:v1.23.7-rke2r2"
level=error msg="error while staging: GET https://registry.cn-hangzhou.aliyuncs.com/v2/rancher/system-agent-installer-rke2/manifests/v1.23.7-rke2r2: MANIFEST_UNKNOWN: manifest unknown; map[Tag:v1.23.7-rke2r2]: failed to get image registry.cn-hangzhou.aliyuncs.com/rancher/system-agent-installer-rke2:v1.23.7-rke2r2"
level=error msg="error executing instruction 0: GET https://registry.cn-hangzhou.aliyuncs.com/v2/rancher/system-agent-installer-rke2/manifests/v1.23.7-rke2r2: MANIFEST_UNKNOWN: manifest unknown; map[Tag:v1.23.7-rke2r2]: failed to get image registry.cn-hangzhou.aliyuncs.com/rancher/system-agent-installer-rke2:v1.23.7-rke2r2"
level=error msg="error encountered during parsing of last run time: parsing time \"\" as \"Mon Jan _2 15:04:05 MST 2006\": cannot parse \"\" as \"Mon\""
level=info msg="[Applyinator] No image provided, creating empty working directory /var/lib/rancher/agent/work/20220617-034001/dca32c8e1254d24c2629802bf5749446b2dda0cbeed41918ea35006c3160df25_0"
level=info msg="[Applyinator] Running command: sh [-c rke2 etcd-snapshot list --etcd-s3=false 2>/dev/null]"
level=info msg="[Applyinator] Command sh [-c rke2 etcd-snapshot list --etcd-s3=false 2>/dev/null] finished with err: <nil> and exit code: 127"
level=error msg="error loading CA cert for probe (kube-scheduler) /var/lib/rancher/rke2/server/tls/kube-scheduler/kube-scheduler.crt: open /var/lib/rancher/rke2/server/tls/kube-scheduler/kube-scheduler.crt: no such file or directory"
level=error msg="error while appending ca cert to pool for probe kube-scheduler"
level=error msg="error loading x509 client cert/key for probe kube-apiserver (/var/lib/rancher/rke2/server/tls/client-kube-apiserver.crt//var/lib/rancher/rke2/server/tls/client-kube-apiserver.key): open /var/lib/rancher/rke2/server/tls/client-kube-apiserver.crt: no such file or directory"
level=error msg="error loading CA cert for probe (kube-apiserver) /var/lib/rancher/rke2/server/tls/server-ca.crt: open /var/lib/rancher/rke2/server/tls/server-ca.crt: no such file or directory"
level=error msg="error while appending ca cert to pool for probe kube-apiserver"
level=error msg="error loading CA cert for probe (kube-controller-manager) /var/lib/rancher/rke2/server/tls/kube-controller-manager/kube-controller-manager.crt: open /var/lib/rancher/rke2/server/tls/kube-controller-manager/kube-controller-manager.crt: no such file or directory"
level=error msg="error while appending ca cert to pool for probe kube-controller-manager"
level=error msg="error encountered during parsing of last run time: parsing time \"\" as \"Mon Jan _2 15:04:05 MST 2006\": cannot parse \"\" as \"Mon\""
level=error msg="error loading x509 client cert/key for probe kube-apiserver (/var/lib/rancher/rke2/server/tls/client-kube-apiserver.crt//var/lib/rancher/rke2/server/tls/client-kube-apiserver.key): open /var/lib/rancher/rke2/server/tls/client-kube-apiserver.crt: no such file or directory"