kubesphere4.1开启devops

安装完kubesphere后,直接在扩展市场安装DevOps组件:

安装完后,我就以为就能用了,到自建的一个企业空间中,创建DevOps项目时,提示当前集群未安装DevOps,到官方网站文档也没有看到相关提示,这时候再回到安装页面,原来这个组件的介绍里面还提到了好几个配置需要配置下:

进入组件的详细介绍页面,有如下说明,按里面的说明改成自己的地址后就能用了:

配置

访问 jenkins

  1. 请检查扩展组件配置里 jenkins.securityRealm.openIdConnect.kubesphereCoreApi 和 jenkins.securityRealm.openIdConnect.jenkinsURL ,确保已经分别修改为 ks-console 和 devops-jenkins 服务实际可访问的地址,如果不是,请修改并等待组件更新完成。

    jenkins:
      securityRealm:
        openIdConnect:
          # The kubesphere-core api used for jenkins OIDC
          # If you want to access to jenkinsWebUI, the kubesphereCoreApi must be specified and browser-accessible
          # Modifying this configuration will take effect only during installation
          # If you wish for changes to take effect after installation, you need to update the jenkins-casc-config ConfigMap, copy the securityRealm configuration from jenkins.yaml to jenkins_user.yaml, save, and wait for approximately 70 seconds for the changes to take effect.
          kubesphereCoreApi: "http://192.168.1.1:30880"
          # The jenkins web URL used for OIDC redirect
          jenkinsURL: "http://192.168.1.1:30180"
    
  2. 请检查配置字典 jenkins-casc-config 中 jenkins_user.yaml 下 securityRealm.oic 的所有地址,确保已经改为与 jenkins.yaml 下 securityRealm.oic 里一样的,都改成 kubesphere-console 实际可访问的地址,如果不一样,请修改并等待 70s 左右使其生效。

        securityRealm:
          oic:
            clientId: "jenkins"
            clientSecret: "jenkins"
            tokenServerUrl: "http://192.168.1.1:30880/oauth/token"
            authorizationServerUrl: "http://192.168.1.1:30880/oauth/authorize"
            userInfoServerUrl: "http://192.168.1.1:30880/oauth/userinfo"
            endSessionEndpoint: "http://192.168.1.1:30880/oauth/logout"
            logoutFromOpenidProvider: true
            scopes: openid profile email
            fullNameFieldName: url
            userNameField: preferred_username
    
  3. 请检查配置字典 kubesphere-config 中的 authentication.issuer.url ,确保已经修改为 kubesphere-console 实际可访问的地址,如果不是,请修改并重启 Deployment ks-apiserver 使其生效。

    authentication:
      issuer:
        url: "http://192.168.1.1:30880"
    
    kubectl -n kubesphere-system rollout restart deploy ks-apiserver
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值