Rancher Server 设置
- Rancher 版本:2.8.5
- 安装选项 (Docker install/Helm Chart):
- 如果是 Helm Chart 安装,需要提供 Local 集群的类型(RKE1, RKE2, k3s, EKS, 等)和版本:
k3s
- 如果是 Helm Chart 安装,需要提供 Local 集群的类型(RKE1, RKE2, k3s, EKS, 等)和版本:
- 在线或离线部署:
离线部署
下游集群信息
- Kubernetes 版本: 1.28.10
- Cluster Type (Local/Downstream): local
- 如果 Downstream,是什么类型的集群?(自定义/导入或为托管 等):
用户信息
- 登录用户的角色是什么? (管理员/集群所有者/集群成员/项目所有者/项目成员/自定义):
- 如果自定义,自定义权限集:
主机操作系统:
redhat 8.1
问题描述:
k3s 和 helm 都安装成功(有个疑问,helm 是不是不能离线安装,只能在线安装?)
重现步骤:
1.按照官网给的安装步骤:离线安装 | Rancher文档
结果:
rancher 可以正常启动,页面访问
预期结果:
截图:
其他上下文信息:
日志
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 76s default-scheduler Successfully assigned cattle-system/rancher-685ffdc768-v8v69 to zb-cluster-vm-05
Normal Pulling 35s (x3 over 76s) kubelet Pulling image "www.harborkt.com/rancher/rancher:v2.8.5"
Warning Failed 35s (x3 over 76s) kubelet Failed to pull image "www.harborkt.com/rancher/rancher:v2.8.5": failed to pull and unpack image "www.harborkt.com/rancher/rancher:v2.8.5": failed to resolve reference "www.harborkt.com/rancher/rancher:v2.8.5": failed to do request: Head "https://www.harborkt.com/v2/rancher/rancher/manifests/v2.8.5": tls: failed to verify certificate: x509: certificate signed by unknown authority
Warning Failed 35s (x3 over 76s) kubelet Error: ErrImagePull
Normal BackOff 9s (x4 over 76s) kubelet Back-off pulling image "www.harborkt.com/rancher/rancher:v2.8.5"
Warning Failed 9s (x4 over 76s) kubelet Error: ImagePullBackOff
注意:直接 docker pull www.harborkt.com/rancher/rancher:v2.8.5,是 ok 的;另外
k3s私有镜像配置:
cat /etc/rancher/k3s/registries.yaml
mirrors:
www.harborkt.com:
endpoint:
- "https://www.harborkt.com"
configs:
"www.harborkt.com":
auth:
username: admin
password: Harbor12345
启动 rancher 命令
helm install rancher ./rancher-2.8.5.tgz \
--namespace cattle-system \
--set hostname=linking-rancher-zb.di.bigdata \
--set certmanager.version=1.15.3 \
--set rancherImage=www.harborkt.com/rancher/rancher \
--set systemDefaultRegistry=www.harborkt.com \
--set useBundledSystemChart=true
@ksd 大佬帮忙看看