Rancher Server 设置
- Rancher 版本:v2.6.6
- 安装选项 (Docker install/Helm Chart): Docker install
- 在线或离线部署:在线
下游集群信息
- Kubernetes 版本: v1.23.15+rke2r1
- Cluster Type (Local/Downstream):
- 如果 Downstream,是什么类型的集群?(自定义/导入或为托管 等):
用户信息
- 登录用户的角色是什么? (管理员/集群所有者/集群成员/项目所有者/项目成员/自定义):管理员
主机操作系统:
CentOS Linux release 7.6.1810 (Core) Linux 3.10.0-957.el7.x86_64
问题描述:
Docker 单节点安装的 rancher,创建 RKE2 集群后报错:Failed to create fleet-default/jarvis cluster.x-k8s.io/v1beta1, Kind=Cluster for rke-cluster fleet-default/jarvis: Internal error occurred: failed calling webhook "default.cluster.cluster.x-k8s.io": failed to call webhook: Post "https://webhook-service.cattle-system.svc:443/mutate-cluster-x-k8s-io-v1beta1-cluster?timeout=10s": service "webhook-service" not found
。
重现步骤:
使用 docker 单节点部署 rancher server(能访问外网),创建 RKE2 集群(仅输入集群名),报错显示:service "webhook-service" not found
部署命令:docker run -d --privileged --restart=unless-stopped -p 80:80 -p 443:443 -v /var/lib/rancher:/var/lib/rancher/ registry.cn-hangzhou.aliyuncs.com/rancher/rancher:v2.6.6
截图:
日志
2023/01/29 09:42:28 [ERROR] error syncing 'fleet-default/jarvis': handler rke-cluster: failed to create fleet-default/jarvis cluster.x-k8s.io/v1beta1, Kind=Cluster for rke-cluster fleet-default/jarvis: Internal error occurred: failed calling webhook "default.cluster.cluster.x-k8s.io": failed to call webhook: Post "https://webhook-service.cattle-system.svc:443/mutate-cluster-x-k8s-io-v1beta1-cluster?timeout=10s": service "webhook-service" not found, requeuing
2023/01/29 09:42:28 [ERROR] error syncing 'fleet-default/jarvis': handler rke-cluster: failed to create fleet-default/jarvis cluster.x-k8s.io/v1beta1, Kind=Cluster for rke-cluster fleet-default/jarvis: Internal error occurred: failed calling webhook "default.cluster.cluster.x-k8s.io": failed to call webhook: Post "https://webhook-service.cattle-system.svc:443/mutate-cluster-x-k8s-io-v1beta1-cluster?timeout=10s": service "webhook-service" not found, requeuing