AWS的ESK启用插件kubesphere Devops异常 namespaces "kubesphere-devops-worker" not found
**************************************************
Waiting for all tasks to be completed …
task network status is successful (⅕)
task multicluster status is successful (⅖)
task openpitrix status is successful (⅗)
task devops status is successful (⅘)
task monitoring status is successful (5/5)
**************************************************
我按照上面的方法把devops创建成功了,但是为什么kubesphere中的devops导航栏为空呢?
麻烦帮忙看下
YyudongK零S
laozhou333 执行下命令 kubectl -n kubesphere-devops-system get pod
看下 devops 相关服务的状态 ?
kubectl -n kubesphere-devops-system get pod
No resources found in kubesphere-devops-system namespace.
是空的,环境是aws eks 1.28。
在此之前是有两个问题:
- 开启devops功能后,报错kubesphere-devops-worker not found,参照上面的解决方案替换helm包为ks-devops-0.2.1.tgz 并手动创建namespace后解决了
- monitoring 安装failed,参考 https://ask.kubesphere.io/forum/d/9338-kubesphere/17 基于ks-installer:v3.3.2镜像,修改了镜像配置后也解决了
接着就碰到了上面反馈的问题,安装均成功,但devops导航栏为空,namespace中也没有任何资源。
YyudongK零S
laozhou333 这个可能是之前安装 devops 失败了,但是 ClusterConfiguration status 里 DevOps 是 enabled ,ks-installer 认为已经安装了,所以没有再安装了;可以重新安装 DevOps :
执行下面命令编译 ClusterConfigurations ks-installer 文件,清理删除 status.devops
kubectl -n kubesphere-system edit clusterconfigurations.installer.kubesphere.io ks-installer
然后在重启下 ks-installer 服务就可以重新安装了。
删除ClusterConfigurations 中status.devops部分后,重启kubectl -n kubesphere-system rollout restart deploy ks-installer,cp ks-devops-0.2.1.tgz的包
kubectl -n kubesphere-system cp ks-devops-0.2.1.tgz $(kubectl get pod -n kubesphere-system -l app=ks-installer -o jsonpath=‘{.items[0].metadata.name}’):/kubesphere/installer/roles/ks-devops/files/ks-devops/charts/
安装完成:
Waiting for all tasks to be completed …
task network status is successful (⅕)
task multicluster status is successful (⅖)
task openpitrix status is successful (⅗)
task devops status is successful (⅘)
task monitoring status is successful (5/5)
但devops仍然为空,麻烦再帮忙看看
YyudongK零S
laozhou333 KubeSphere 是什么版本的 ?执行下 helm ls -A
看下 DevOps release 有没有安装?
是3.3.2版本的
kubesphere/ks-installer:v3.3.2
hi,请问我该如何解决这个问题,期望得到回复
YyudongK零S
laozhou333 从上面截图发现 DevOps release 没有安装;可以参考 26楼 ,再尝试删掉 status.devops ,然后修改下 devops 下的任意配置触发下 DevOps 安装试试 ;
已经尝试很多次了,如果不手动创建namespace会报错 kubesphere-devops-worker not found,手动创建的情况下安装完成,但devops导航栏为空,实际并未安装
YyudongK零S
laozhou333 执行下面命令 kubectl -n kubesphere-system exec -it $(kubectl get pod -n kubesphere-system -l app=ks-installer -o jsonpath='{.items[0].metadata.name}') -- sh
进入 ks-installer 容器,然后进到目录 /kubesphere/results/devops/devops/job_events ,看下这里的 json 文件能不能找到原因,比如:cat 140-ad4ba4a6-7c1e-4fb3-b9a7-7eb558882df4.json | jq