创建部署问题时,请参考下面模板,你提供的信息越多,越容易及时获得解答。如果未按模板创建问题,管理员有权关闭问题。
确保帖子格式清晰易读,用 markdown code block 语法格式化代码块。
你只花一分钟创建的问题,不能指望别人花上半个小时给你解答。
操作系统信息
例如:云实例,Ubuntu20.04,32C/128G * 3
Kubernetes版本信息
root@10.74.36.154:/data/# kubectl version
Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.10", GitCommit:"7e54d50d3012cf3389e43b096ba35300f36e0817", GitTreeState:"clean", BuildDate:"2022-08-17T18:32:54Z", GoVersion:"go1.17.13", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.10", GitCommit:"7e54d50d3012cf3389e43b096ba35300f36e0817", GitTreeState:"clean", BuildDate:"2022-08-17T18:26:59Z", GoVersion:"go1.17.13", Compiler:"gc", Platform:"linux/amd64"}
容器运行时
Version: 0.1.0
RuntimeName: containerd
RuntimeVersion: v1.6.2
RuntimeApiVersion: v1alpha2
KubeSphere版本信息
v3.3.0。在线安装。在已有K8s上安装。
问题是什么
下载配置文件
wget https://github.com/kubesphere/ks-installer/releases/download/v3.3.0/cluster-configuration.yaml
打开外部监控
...
monitoring:
type: external # Whether to specify the external prometheus stack, and need to modify the endpoint at the next line.
endpoint: http://vmselect-otel.monitoring-system.svc:8481/select/0/prometheus # Prometheus endpoint to get metrics data.
GPUMonitoring: # Enable or disable the GPU-related metrics. If you enable this switch but have no GPU resources, Kubesphere will set it to zero.
enabled: false
...
# apply
kubectl apply -f cluster-configuration.yaml
等待服务启动成功
apiserver启动报错

错误日志:
root@10.74.36.154:~# kubectl get pods -n kubesphere-system
NAME READY STATUS RESTARTS AGE
ks-apiserver-6c6b5b9486-fkttj 0/1 CrashLoopBackOff 9 (4m46s ago) 29m
ks-console-5c5676fb55-xbzxr 1/1 Running 0 81m
ks-controller-manager-6cd4df5c-fjdpv 1/1 Running 0 81m
ks-installer-c9655d997-f55xk 1/1 Running 0 88m
redis-6c55bb6b94-gq9wt 1/1 Running 0 82m
root@10.74.36.154:~# kubectl logs -n kubesphere-system ks-apiserver-6c6b5b9486-fkttj
W0928 11:50:50.841635 1 client_config.go:615] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.
W0928 11:50:50.843302 1 client_config.go:615] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.
I0928 11:50:50.853642 1 interface.go:50] start helm repo informer
I0928 11:50:51.300530 1 apiserver.go:417] Start cache objects
Error: failed to fetch group version resources notification.kubesphere.io/v2beta1: the server could not find the requested resource
2022/09/28 11:50:52 failed to fetch group version resources notification.kubesphere.io/v2beta1: the server could not find the requested resource