Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)17k · #10769

kubesphere-devops-jenkins

Skill này làm gì

Skill này giúp agent AI cấu hình và xử lý sự cố Jenkins, công cụ build được KubeSphere DevOps sử dụng. Skill dành cho người vận hành nền tảng chạy build CI trong KubeSphere.

Khi nào nên dùng

  • ✓Khi bạn cần thay đổi cách Jenkins xác thực người dùng, chẳng hạn bằng LDAP hoặc OIDC.
  • ✓Khi bạn muốn tùy chỉnh image của agent build Jenkins hoặc kết nối một máy chủ GitLab.
  • ✓Khi một build Jenkins không khởi động được hoặc không tìm thấy log và artifact của nó.

Liên kết skill

https://github.com/kubesphere/kubesphere/blob/master/skills/kubesphere-devops-jenkins/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/kubesphere/kubesphere/blob/master/skills/kubesphere-devops-jenkins/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Bạn có thể giúp tôi kết nối Jenkins trong KubeSphere DevOps với LDAP của công ty để mọi người có thể đăng nhập không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent đọc cấu hình Jenkins trong cụm, kiểm tra thiết lập hiện tại và đề xuất thay đổi. Nó cũng có thể tra cứu thông tin quản trị và cổng truy cập cho bảng điều khiển Jenkins.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

KubeSphere DevOps Jenkins Configuration

Overview

KubeSphere DevOps embeds Jenkins as the CI engine. Jenkins is configured via Configuration as Code (CasC) and provides the underlying pipeline execution environment. Understanding Jenkins configuration is essential for customizing agents, authentication, and resource management.

When to Use

  • Accessing Jenkins console directly
  • Configuring LDAP or OIDC authentication
  • Customizing Jenkins agent images
  • Configuring GitLab or other SCM servers
  • Troubleshooting Jenkins startup issues
  • Updating Jenkins after DevOps upgrade
  • Triggering builds via API
  • Downloading build artifacts
  • Viewing build logs and status

Accessing Jenkins Console

Get Admin Credentials

# Get Jenkins admin user and password
kubectl -n kubesphere-devops-system get secret devops-jenkins -o yaml

# Decode values
echo "<jenkins-admin-password-base64>" | base64 -d
echo "<jenkins-admin-user-base64>" | base64 -d

Get Jenkins NodePort

kubectl -n kubesphere-devops-system get svc devops-jenkins
# Default NodePort: 30180

Access via: http://<master-node-ip>:30180

Configuration As Code (CasC)

Jenkins configuration is managed through the jenkins-casc-config ConfigMap:

# View current CasC
kubectl -n kubesphere-devops-system get cm jenkins-casc-config -o yaml

Key Configuration Sections

agent:
  jenkins:
    Master:
      NodeSelector: {}
      Tolerations: []
    Agent:
      Image: "jenkins/inbound-agent"
      Tag: "3309.v27b_9314fd1a_4-1-jdk21"
      Privileged: false
      NodeSelector: {}

Authentication Configuration

LDAP Integration

agent:
  jenkins:
    exactSecurityRealm:
      ldap:
        configurations:
        - displayNameAttributeName: "uid"
          mailAddressAttributeName: "mail"
          inhibitInferRootDN: false
          managerDN: "cn=admin,dc=kubesphere,dc=io"
          managerPasswordSecret: "admin"
          rootDN: "dc=kubesphere,dc=io"
          userSearchBase: "ou=Users"
          userSearch: "(&(objectClass=inetOrgPerson)(|(uid={0})(mail={0})))"
          groupSearchBase: "ou=Groups"
          groupSearchFilter: "(&(objectClass=posixGroup)(cn={0}))"
          server: "ldap://openldap.kubesphere-system.svc:389"
        disableMailAddressResolver: false
        disableRolePrefixing: true

OpenID Connect (OIDC) Integration

agent:
  jenkins:
    exactSecurityRealm:
      oic:
        clientId: "jenkins"
        clientSecret: "jenkins"
        tokenServerUrl: "http://192.168.1.20:30880/oauth/token"
        authorizationServerUrl: "http://192.168.1.20:30880/oauth/authorize"
        userInfoServerUrl: "http://192.168.1.20:30880/oauth/userinfo"
        endSessionEndpoint: "http://192.168.1.20:30880/oauth/logout"
        logoutFromOpenidProvider: true
        scopes: openid profile email
        fullNameFieldName: url
        userNameField: preferred_username
    redirectURIs:
    - http://192.168.1.20:30180/securityRealm/finishLogin

GitLab Integration

Configure GitLab servers for pipeline integration:

agent:
  jenkins:
    unclassified:
      gitLabServers:
        - name: "gitlab-a"
          serverUrl: "https://gitlab.a.com"
        - name: "gitlab-b"
          serverUrl: "https://gitlab.b.com"

After updating ConfigMap, create credentials in Jenkins Console:

  1. Manage Jenkins > System
  2. Find GitLab section
  3. Add credentials (GitLab Personal Access Token)
  4. Test connection
  5. Save

Agent Customization

Update JNLP Image (v1.2.x)

# Get current config
kubectl -n kubesphere-devops-system get cm jenkins-casc-config -o yaml > /tmp/casc-old.yaml

# Update image version
sed 's/inbound-agent:4.10-2/inbound-agent:3309.v27b_9314fd1a_4-1-jdk21/g' /tmp/casc-old.yaml > /tmp/casc.yaml

# Apply new config
kubectl apply -f /tmp/casc.yaml

# Restart Jenkins
kubectl -n kubesphere-devops-system rollout restart deployment devops-jenkins

Enable Podman for Non-Docker Environments

For hosts running containerd instead of Docker:

agent:
  jenkins:
    Agent:
      Privileged: true  # Required for podman

Use agent images with -podman suffix. These alias docker command to podman.

Custom Agent PodTemplate

agent:
  jenkins:
    Agent:
      PodTemplate:
        Name: "default"
        Label: "jenkins-agent"
        Containers:
        - Name: "jnlp"
          Image: "jenkins/inbound-agent:3309.v27b_9314fd1a_4
Câu hỏi thường gặp

Cấu hình Jenkins được lưu ở đâu?

Skill nói nó được giữ trong một ConfigMap trong namespace hệ thống DevOps, và agent đọc nó bằng kubectl.

Agent có thể mở bảng điều khiển Jenkins cho tôi không?

Nó có thể chỉ bạn cách truy cập bảng điều khiển, dùng cổng truy cập và thông tin quản trị được lưu trong cụm.

Nó có thể kích hoạt build không?

Có. Skill bao gồm việc kích hoạt build qua API và đọc log cùng trạng thái build.

Chi tiết

Mô tả gốc của tác giả

Use when configuring Jenkins in KubeSphere DevOps, including agent customization, LDAP/OIDC integration, build artifact retrieval, or troubleshooting Jenkins issues

repo: kubesphere/kubesphere

Độ phổ biến

Sao GitHub
17k
Vị trí xếp hạng
#10769
Giấy phép
—
Cập nhật
14/7/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự