Access Jenkins Dashboard
When DevOps is installed, the Jenkins dashboard is also installed by default. However, you need to configure it according to the following steps before you can access the Jenkins dashboard.
Prerequisites
DevOps must have been installed and enabled.
Steps
-
Run the following command on the cluster node to get the Jenkins address.
export NODE_PORT=$(kubectl get --namespace kubesphere-devops-system -o jsonpath="{.spec.ports[0].nodePort}" services devops-jenkins) export NODE_IP=$(kubectl get nodes --namespace kubesphere-devops-system -o jsonpath="{.items[0].status.addresses[0].address}") echo http://$NODE_IP:$NODE_PORT
You will get output similar to the following:
http://10.77.1.201:30180
-
Check the
jenkins.securityRealm.openIdConnect.kubesphereCoreApi
andjenkins.securityRealm.openIdConnect.jenkinsURL
in the DevOps configuration, ensuring they are modified to the actual accessible addresses of the kubesphere-console and devops-jenkins services, respectively. If not, modify them and wait for the extension to update.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"
-
Check all addresses under
securityRealm.oic
in thejenkins_user.yaml
of thejenkins-casc-config
ConfigMap, ensuring they are the same as those undersecurityRealm.oic
injenkins.yaml
, and are modified to the actual accessible address of kubesphere-console. If they are not the same, modify them and wait for them to take effect.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
-
Check the
authentication.issuer.url
in thekubesphere-config
ConfigMap, ensuring it is modified to the actual accessible address of kubesphere-console. If not, modify it and restart the deploymentks-apiserver
for it to take effect.authentication: issuer: url: "http://192.168.1.1:30880"
kubectl -n kubesphere-system rollout restart deploy ks-apiserver
-
Use the address http://NodeIP:30180 to access the Jenkins dashboard.
Jenkins is configured with KubeSphere LDAP, which means you can log in to Jenkins directly using your KubeSphere account (e.g.,
admin/P@88w0rd
).
Feedback
Was this page Helpful?
Receive the latest news, articles and updates from KubeSphere
Thanks for the feedback. If you have a specific question about how to use KubeSphere, ask it on Slack. Open an issue in the GitHub repo if you want to report a problem or suggest an improvement.