• 安装部署
  • KubeSphere:v4.1.2多集群管理无法添加集群503报错

创建部署问题时,请参考下面模板,你提供的信息越多,越容易及时获得解答。如果未按模板创建问题,管理员有权关闭问题。
确保帖子格式清晰易读,用 markdown code block 语法格式化代码块。
你只花一分钟创建的问题,不能指望别人花上半个小时给你解答。

操作系统信息
虚拟机centos7.9

Kubernetes版本信息
Client Version: version.Info{Major:“1”, Minor:“23”, GitVersion:“v1.23.15”, GitCommit:“b84cb8ab29366daa1bba65bc67f54de2f6c34848”, GitTreeState:“clean”, BuildDate:“2022-12-08T10:49:13Z”, GoVersion:“go1.17.13”, Compiler:“gc”, Platform:“linux/amd64”}

Server Version: version.Info{Major:“1”, Minor:“29”, GitVersion:“v1.29.6+k3s2”, GitCommit:“b4b156d9d14eeb475e789718b3a6b78aba00019e”, GitTreeState:“clean”, BuildDate:“2024-07-03T21:17:46Z”, GoVersion:“go1.21.11”, Compiler:“gc”, Platform:“linux/amd64”}

WARNING: version difference between client (1.23) and server (1.29) exceeds the supported minor version skew of +/-1

容器运行时
docker version / crictl version / nerdctl version 结果贴在下方
Client: Docker Engine - Community

Version: 26.1.4

API version: 1.45

Go version: go1.21.11

Git commit: 5650f9b

Built: Wed Jun 5 11:32:04 2024

OS/Arch: linux/amd64

Context: default

Server: Docker Engine - Community

Engine:

Version: 26.1.4

API version: 1.45 (minimum version 1.24)

Go version: go1.21.11

Git commit: de5c9cf

Built: Wed Jun 5 11:31:02 2024

OS/Arch: linux/amd64

Experimental: false

containerd:

Version: 1.6.33

GitCommit: d2d58213f83a351ca8f528a95fbd145f5654e957

runc:

Version: 1.1.12

GitCommit: v1.1.12-0-g51d5e94

docker-init:

Version: 0.19.0

GitCommit: de40ad0

[root@master rancher]# crictl version

Version: 0.1.0

RuntimeName: containerd

RuntimeVersion: 1.6.33

RuntimeApiVersion: v1

KubeSphere版本信息
KubeSphere:v4.1.2
k8s: v1.29.6+k3s2

问题是什么
报错日志是什么,最好有截图。

kubectl logs -f -n kubesphere-system pod/ks-controller-manager-854849865f-vvtk7

I1011 17:12:27.197287 1 cluster_controller.go:396] Finished installing KS Core for the cluster test

E1011 17:12:27.197364 1 controller.go:329] “Reconciler error” err=<

failed to reconcile cluster test: failed to install KS Core in cluster test: unable to build kubernetes objects from release manifest: resource mapping not found for name: "restart-extensions-museum" namespace: "kubesphere-system" from "": no matches for kind "CronJob" in version "batch/v1beta1"

ensure CRDs are installed first

kubectl logs -f -n kubesphere-system pod/ks-apiserver-8ddb7b9d5-g5jll -f

I1011 17:18:23.821334 1 filters.go:96] 10.42.1.21 - “GET /clusters/test/kapis/iam.kubesphere.io/v1beta1/users/admin/roletemplates?scope=cluster&cluster=test HTTP/1.1” 503 165 0ms

member 集群的 K8s 版本是多少,到 member 集群的节点上执行一下 kubectl version 看看

    iawia002 Client Version: version.Info{Major:“1”, Minor:“23”, GitVersion:“v1.23.15”, GitCommit:“b84cb8ab29366daa1bba65bc67f54de2f6c34848”, GitTreeState:“clean”, BuildDate:“2022-12-08T10:49:13Z”, GoVersion:“go1.17.13”, Compiler:“gc”, Platform:“linux/amd64”}

    Server Version: version.Info{Major:“1”, Minor:“26+”, GitVersion:“v1.26.10-vke.23”, GitCommit:“95d1573a050ec9b79b3e41e1323ef0f98ac586fd”, GitTreeState:“clean”, BuildDate:“2024-08-19T03:16:20Z”, GoVersion:“go1.20.10”, Compiler:“gc”, Platform:“linux/amd64”}

    这是 ks-core 的 helm chart 的一个 bug,针对版本号后面有 -xxx 的这种发行版(v1.26.10-vke.23)会判断错它实际的版本,前几天我们已经注意到并且修复了,等一下下个小版本,另一个折中的方案是可以先添加不是这种特殊后缀发行版的 K8s 集群