• DevOps
  • AWS的ESK启用插件kubesphere Devops异常 namespaces "kubesphere-devops-worker" not found

删除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仍然为空,麻烦再帮忙看看

    laozhou333 KubeSphere 是什么版本的 ?执行下 helm ls -A 看下 DevOps release 有没有安装?

    hi,请问我该如何解决这个问题,期望得到回复

      laozhou333 从上面截图发现 DevOps release 没有安装;可以参考 26楼 ,再尝试删掉 status.devops ,然后修改下 devops 下的任意配置触发下 DevOps 安装试试 ;

      已经尝试很多次了,如果不手动创建namespace会报错 kubesphere-devops-worker not found,手动创建的情况下安装完成,但devops导航栏为空,实际并未安装

        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

        是ks-install版本问题吗?我cp 2.1版本后是有两个tgz的包,曾怀疑是0.2.1的包未生效,尝试删除0.1.19但对0.1.19也有依赖

        -rw-r–r– 1 root root 66841 May 25 2023 ks-devops-0.1.19.tgz
        -rw-r–r– 1 501 dialout 71149 Mar 24 14:26 ks-devops-0.2.1.tgz

          cat 140-364142e0-4652-4c30-ae36-addf046cffbd.json |jq

          {

          “uuid”: “364142e0-4652-4c30-ae36-addf046cffbd”,

          “counter”: 140,

          “stdout”: "",

          “start_line”: 170,

          “end_line”: 170,

          “runner_ident”: “devops”,

          “event”: “runner_on_start”,

          “pid”: 30139,

          “created”: “2024-03-25T03:57:49.481470”,

          “parent_uuid”: “2eb11b1e-62d8-f385-6410-000000000042”,

          “event_data”: {

          "playbook": "/kubesphere/playbooks/devops.yaml",
          
          "playbook_uuid": "49c7852d-3774-498c-8c07-bd2a93617d4b",
          
          "play": "localhost",
          
          "play_uuid": "2eb11b1e-62d8-f385-6410-000000000005",
          
          "play_pattern": "localhost",
          
          "task": "ks-devops | Upgrading or installing ks-devops",
          
          "task_uuid": "2eb11b1e-62d8-f385-6410-000000000042",
          
          "task_action": "shell",
          
          "resolved_action": "shell",
          
          "task_args": "",
          
          "task_path": "/kubesphere/installer/roles/ks-devops/tasks/main.yaml:191",
          
          "role": "ks-devops",
          
          "host": "localhost",
          
          "uuid": "364142e0-4652-4c30-ae36-addf046cffbd"

          }

          }

          查找了/kubesphere/results/devops/devops/job_events目录下所有包含"error"的文件,如图,只有Error from server (NotFound): namespaces \“kubesphere-devops-system\” not found"
          升级kubesphere版本可以解决吗?

          laozhou333 是的,你的怀疑是对的,ks 3.3.2 用的 0.1.19 版本的 ks-devops ; ks 3.4.0 用的 0.2.1 版本的;

          你的环境是 ks 3.3.2 ,所以应该用 0.1.19 版本的:ks-devops-0.1.19.tgz

          用这个 0.1.19 版本的应该就可以了。