• 安装部署
  • ks-controller-manager一直重启报错 failed to list gateway.kubesphere.io/v1alpha1

操作系统信息
例如:物理机,Centos7.9/

Kubernetes版本信息
kubectl version 命令执行结果贴在下方

[root@t4-gpu21 340]# kubectl version

WARNING: This version information is deprecated and will be replaced with the output from kubectl version –short. Use –output=yaml|json to get the full version.

Client Version: version.Info{Major:“1”, Minor:“25”, GitVersion:“v1.25.0”, GitCommit:“a866cbe2e5bbaa01cfd5e969aa3e033f3282a8a2”, GitTreeState:“clean”, BuildDate:“2022-08-23T17:44:59Z”, GoVersion:“go1.19”, Compiler:“gc”, Platform:“linux/amd64”}

Kustomize Version: v4.5.7

Server Version: version.Info{Major:“1”, Minor:“25”, GitVersion:“v1.25.0”, GitCommit:“a866cbe2e5bbaa01cfd5e969aa3e033f3282a8a2”, GitTreeState:“clean”, BuildDate:“2022-08-23T17:38:15Z”, GoVersion:“go1.19”, Compiler:“gc”, Platform:“linux/amd64”}

容器运行时
crictl version结果贴在下方

[root@t4-gpu21 340]# crictl version

Version: 0.1.0

RuntimeName: containerd

RuntimeVersion: 1.6.33

RuntimeApiVersion: v1

KubeSphere版本信息
例如:v3.4.1。在线安装。在已有K8s上安装。

问题是什么
安装完毕,修改密码无法登陆。,创建用户也无法登陆,ks-controller-manager一直重启报错Failed to watch gateway.kubesphere.io/v1alpha1, Kind=Gateway: failed to list gateway.kubesphere.io/v1alpha1, Kind=Gateway: request to convert CR from an invalid group/version: gateway.kubesphere.io/v2alpha1

ks-controller-manager-5c88dcf8fc-jlcjm 报错

查看一下你的集群里的gateway crd。

kubectl get crd gateways.gateway.kubesphere.io -oyaml

看一下版本号,如果是 v2alpha1就直接删掉。

kubectl delete crd gateways.gateway.kubesphere.io

重新安装 v1alpha1 版本

kubectl apply -f https://raw.githubusercontent.com/kubesphere/kubesphere/refs/tags/v3.4.1/config/ks-core/crds/gateway.kubesphere.io_gateways.yaml