ks-installer失败:unable to retrieve the complete list of server APIs:...

1、kubesphere客气可观测性没有触发相关服务部署

spec:
  ……
  monitoring:
    whizard:
      client:              #在host集群无需编辑client配置
        clusterName: ''
        gatewayUrl: ''
      enabled: true        #将“false”更改为“true”。
      server: 
        nodePort: 30990    #默认在host集群开放30990端口与client进行通信,可根据实际网络模型自行配置 
  ……
status:
  …………
  monitoring:
    status: ""            #将status从'enabled'置空以重新部署monitoring
  • 少了一步status内容置空

2、修改cc ks-installer后重启服务异常

ks-installer失败:unable to retrieve the complete list of server APIs:..._第1张图片

[root@xpqcsyx27x33xx9ten ~]# kubectl logs -f -n  kubesphere-system ks-installer-6449db646-tv4l5
2023-05-17T11:18:16+08:00 INFO     : shell-operator latest
2023-05-17T11:18:16+08:00 INFO     : Use temporary dir: /tmp/shell-operator
2023-05-17T11:18:16+08:00 INFO     : Initialize hooks manager ...
2023-05-17T11:18:16+08:00 INFO     : Search and load hooks ...
2023-05-17T11:18:16+08:00 INFO     : Load hook config from '/hooks/kubesphere/installRunner.py'
2023-05-17T11:18:16+08:00 INFO     : HTTP SERVER Listening on 0.0.0.0:9115
2023-05-17T11:18:17+08:00 INFO     : Load hook config from '/hooks/kubesphere/schedule.sh'
2023-05-17T11:18:17+08:00 INFO     : Initializing schedule manager ...
2023-05-17T11:18:17+08:00 INFO     : KUBE Init Kubernetes client
2023-05-17T11:18:17+08:00 INFO     : KUBE-INIT Kubernetes client is configured successfully
2023-05-17T11:18:17+08:00 INFO     : MAIN: run main loop
2023-05-17T11:18:17+08:00 INFO     : MAIN: add onStartup tasks
2023-05-17T11:18:17+08:00 INFO     : Running schedule manager ...
2023-05-17T11:18:17+08:00 INFO     : MSTOR Create new metric shell_operator_live_ticks
2023-05-17T11:18:17+08:00 INFO     : MSTOR Create new metric shell_operator_tasks_queue_length
2023-05-17T11:18:17+08:00 INFO     : QUEUE add all HookRun@OnStartup
2023-05-17T11:18:17+08:00 ERROR    : error getting GVR for kind 'ClusterConfiguration': unable to retrieve the complete list of server APIs: aggregated.springcloud.kubesphere.io/v1alpha1: the server is currently unable to handle the request
2023-05-17T11:18:17+08:00 ERROR    : Enable kube events for hooks error: unable to retrieve the complete list of server APIs: aggregated.springcloud.kubesphere.io/v1alpha1: the server is currently unable to handle the request
2023-05-17T11:18:20+08:00 INFO     : TASK_RUN Exit: program halts.
[root@xpqcsyx27x33xx9ten ~]# kubectl api-resources | grep aggregate
error: unable to retrieve the complete list of server APIs: aggregated.springcloud.kubesphere.io/v1alpha1: the server is currently unable to handle the request
  • 主要是开启可springcloud模块,后由于资源不足,将nacos和deployment.apps/spring-cloud-controller-manager 关闭导致api丢失(主要是deployment.apps/spring-cloud-controller-manager 管理着v1alpha1.aggregated.springcloud.kubesphere.io )

  • 可以使用命令kubectl get apiservice或者kubectl get apiservices.apiregistration.k8s.io 查看相关api是否正常,如果存在false则ks-installer无法启动,会报相关api错误

  • 启动deployment.apps/spring-cloud-controller-manager服务后,api正常下发
    ks-installer失败:unable to retrieve the complete list of server APIs:..._第2张图片
    ks-installer成功启动

你可能感兴趣的:(kubernetes,运维,运维,linux,kubernetes)