본문으로 건너뛰기
cccskills
무료GitHub에 공개

kubesphere-devops-overview

Set up and troubleshoot automated build, test, and deployment workflows in KubeSphere DevOps. Covers Jenkins integration, project management, multi-cluster installation, and ArgoCD integration for deployments managed through Git.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Use when working with KubeSphere DevOps extension, CI/CD pipelines, Jenkins integration, or pipeline troubleshooting

연동 도구GitLabKubernetes
설치 방법 보기

이럴 때 유용합니다

  • Set up build, test, and deployment pipelines
  • Configure Jenkins integration
  • Install DevOps across multiple clusters
  • Investigate stalled or failed pipeline runs

포함된 파일(1)

  • SKILL.md13.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

KubeSphere DevOps Overview

Overview

KubeSphere DevOps provides CI/CD capabilities through Jenkins integration, supporting both graphical pipeline editing and Jenkinsfile-based pipelines. It enables automated builds, testing, and deployments across multi-cluster environments with ArgoCD integration for GitOps continuous deployment.

When to Use

  • Setting up CI/CD pipelines in KubeSphere
  • Configuring Jenkins integration
  • Managing DevOps projects and pipelines
  • Troubleshooting pipeline execution issues
  • Integrating with GitHub, GitLab, or SVN repositories
  • Configuring SonarQube for code quality

Core Concepts

Resource Mapping

KubeSphere DevOps maps resources across three layers:

KubeSphere          Kubernetes                    Jenkins
─────────────────────────────────────────────────────────────
Workspace           Workspace CR                  (authorization)
└── DevOpsProject   ├── DevOpsProject CR          └── Folder
    (Namespace)     └── Namespace (with label)
    └── Pipeline    ├── Pipeline CR               └── WorkflowJob
        └── Run     ├── PipelineRun CR            └── Build #N

Key Concept: A "DevOps Project" in KubeSphere is fundamentally a Kubernetes namespace with the devops.kubesphere.io/managed=true label. The DevOpsProject CR exists as a wrapper resource, but when querying for accessible DevOps projects, you interact with namespaces, not the DevOpsProject CRs directly.

For tenants: Use the /kapis/devops.kubesphere.io/v1alpha3/workspaces/{workspace}/namespaces endpoint to list accessible DevOps projects (returns namespace resources). The /apis/devops.kubesphere.io/v1alpha3/devopsprojects endpoint requires cluster-scoped permissions and returns 403 for tenants.

DevOps Project Naming Convention

DevOps projects have two forms of names:

Name TypeExampleSourceUsage
Shortnamedevopstest.metadata.generateName in DevOpsProject CRDisplay/user-friendly name
Fullnamedevopstestc2nj7.metadata.name in DevOpsProject CR and NamespaceActual resource identifier

Important:

  • The fullname is the actual Kubernetes namespace name (e.g., devopstestc2nj7)
  • When creating a DevOps project with shortname devopstest, KubeSphere generates a unique fullname by appending random characters
  • All API operations use the fullname (namespace name), not the shortname
  • When a user refers to a project by shortname and multiple projects match, ask for confirmation before proceeding

Workspace Association

DevOpsProjects belong to a Workspace via label:

apiVersion: devops.kubesphere.io/v1alpha3
kind: DevOpsProject
metadata:
  name: my-project
  labels:
    kubesphere.io/workspace: demo   # Associates with Workspace 'demo'

To create and associate:

# 1. Create Workspace
kubectl apply -f - <<EOF
apiVersion: tenant.kubesphere.io/v1beta1
kind: Workspace
metadata:
  name: demo
EOF

# 2. Create DevOpsProject with label
kubectl apply -f - <<EOF
apiVersion: devops.kubesphere.io/v1alpha3
kind: DevOpsProject
metadata:
  name: my-project
  labels:
    kubesphere.io/workspace: demo
EOF

Project Components

┌──────────────────────────────────────────────────────────────┐
│                     DevOps Project                            │
│  (Namespace with devops.kubesphere.io/managed=true label)    │
└──────────────────────┬───────────────────────────────────────┘
                       │
        ┌──────────────┼──────────────┐
        │              │              │
┌───────▼──────┐ ┌─────▼─────┐ ┌──────▼──────┐
│  Pipelines   │ │Credentials│ │   Webhooks  │
│              │ │           │ │             │
│ - Graphical  │ │ - SSH     │ │ - GitHub    │
│ - Jenkinsfile│ │ - Basic   │ │ - GitLab    │
│ - Multi-branch│ │ - Token  │ │ - Generic   │
└──────────────┘ └───────────┘ └─────────────┘

Installation

Using InstallPlan (Recommended for Production)

Minimal Installation (Default Config) - RECOMMENDED:

apiVersion: kubesphere.io/v1alpha1
kind: InstallPlan
metadata:
  name: devops
  namespace: kubesphere-system
spec:
  extension:
    name: devops
    version: 1.2.4
  enabled: true
  upgradeStrategy: Manual   # Required for production
  # Note: spec.config is omitted to use extension default values

When to use minimal installation:

  • First-time installation to test default configuration
  • Standard deployments without special resource requirements
  • When you want to use the extension's tested defaults

Custom Configuration (Only When Needed):

apiVersion: kubesphere.io/v1alpha1
kind: InstallPlan
metadata:
  name: devops
  namespace: kubesphere-system
spec:
  extension:
    name: devops
    version: 1.2.4
  enabled: true
  upgradeStrategy: Manual   # Required for production
  # config: leave empty to use default values

Custom Configuration (Override Defaults):

apiVersion: kubesphere.io/v1alpha1
kind: InstallPlan
metadata:
  name: devops
  namespace: kubesphere-system
spec:
  extension:
    name: devops
    version: 1.2.4
  enabled: true
  upgradeStrategy: Manual   # Required for production
  config: |
    # Overrides values from DevOps chart's values.yaml
    agent:
      jenkins:
        Master:
          NodeSelector: {}
          resources:
            requests:
              cpu: "500m"
              memory: "4Gi"
            limits:
              cpu: "2000m"
              memory: "8Gi"
        Agent:
          Image: "jenkins/inbound-agent"
          Tag: "3309.v27b_9314fd1a_4-1-jdk21"
          Privileged: false

Important:

  • Always use upgradeStrategy: Manual for production
  • config is optional - omit or leave empty to use extension defaults
  • Config values override the extension's values.yaml settings
  • DevOps is a critical infrastructure component - plan upgrades carefully

Multi-Cluster Installation

To install DevOps agent on member clusters, add clusterScheduling:

apiVersion: kubesphere.io/v1alpha1
kind: InstallPlan
metadata:
  name: devops
  namespace: kubesphere-system
spec:
  extension:
    name: devops
    version: 1.2.4
  enabled: true
  upgradeStrategy: Manual
  config: |
    # Base config for all clusters
    agent:
      jenkins:
        Master:
          resources:
            requests:
              cpu: "500m"
              memory: "4Gi"
  clusterScheduling:
    placement:
      clusters:
        - host      # Install on host cluster
        - member1   # Install on member1
        - member2   # Install on member2
    # Optional: per-cluster overrides
    overrides:
      member1: |
        agent:
          jenkins:
            Master:
              resources:
                limits:
                  memory: "8Gi"   # Larger master for member1
      member2: |
        agent:
          jenkins:
            Agent:
              NodeSelector:
                zone: west

Key Points:

  • clusterScheduling.placement.clusters: List clusters where DevOps agent runs
  • clusterScheduling.overrides: Cluster-specific config overrides
  • Without clusterScheduling, DevOps only runs on the host cluster
  • Overrides merge with base config, override values take precedence

Using Helm (Alternative)

helm upgrade --install devops kse-extensions/devops \
  -n kubesphere-devops-system \
  --create-namespace

Post-Installation Verification

Verify the DevOps installation:

# Check DevOps pods
kubectl get pods -n kubesphere-devops-system

# Check InstallPlan status
kubectl get installplan devops -n kubesphere-system

# For multi-cluster: check agent status on each cluster
kubectl get installplan devops -n kubesphere-system -o jsonpath='{.status.clusterSchedulingStatuses}'

Architecture

ComponentPurposeNamespace
devops-jenkinsJenkins masterkubesphere-devops-system
devops-apiserverDevOps API servicekubesphere-devops-system
devops-controllerResource controllerskubesphere-devops-system
devops-argocd-*ArgoCD (GitOps)argocd
Jenkins AgentPipeline executorsDynamic (per pipeline)
-------------------------------
devops-jenkinsJenkins masterkubesphere-devops-system
devops-apiserverDevOps API servicekubesphere-devops-system
devops-controllerResource controllerskubesphere-devops-system
Jenkins AgentPipeline executorsDynamic (per pipeline)

Jenkins Integration

KubeSphere DevOps integrates with Jenkins for CI/CD execution. The secret devops-jenkins contains the admin token for direct Jenkins access:

# Get Jenkins admin token
TOKEN=$(kubectl -n kubesphere-devops-system get secret devops-jenkins -o jsonpath='{.data.jenkins-admin-token}' | base64 -d)

# Access Jenkins API
kubectl run curl-jenkins --rm -i --restart=Never --image=curlimages/curl \
  -- "http://admin:${TOKEN}@devops-jenkins.kubesphere-devops-system:80/api/json"

Jenkins NodePort:

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

Access Jenkins Console:

  • URL: http://<node-ip>:30180
  • Username: admin
  • Password: Get from secret above

ArgoCD Integration

KubeSphere DevOps includes ArgoCD v2.11.7 for GitOps continuous deployment:

ArgoCD Components:

ComponentPurpose
application-controllerManages Application state
applicationset-controllerManages ApplicationSet resources
dex-serverSSO authentication
notifications-controllerEvent notifications
repo-serverRepository operations
argocd-serverAPI/UI server
redisCache layer

Access ArgoCD:

# Get ArgoCD server URL
kubectl get svc devops-agent-argocd-server -n argocd

# Get admin password
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath='{.data.password}' | base64 -d

Key Features:

  • Declarative GitOps deployment
  • Multi-source application support
  • Automated sync policies
  • SSO integration via Dex
  • Notification webhooks

Key Resources

Key Resources

ResourceAPI VersionPurpose
Pipelinedevops.kubesphere.io/v1alpha3CI/CD pipeline definition
DevOpsProjectdevops.kubesphere.io/v1alpha3DevOps project (namespace wrapper)
Credentialv1/SecretRepository and deployment credentials

Quick Commands

# List DevOps projects
kubectl get devopsprojects

# List pipelines in a project
kubectl get pipelines -n <devops-project-namespace>

# Get pipeline runs
kubectl get pipelineruns -n <devops-project-namespace>

# Check Jenkins status
kubectl -n kubesphere-devops-system get pods -l app=devops-jenkins

# View Jenkins logs
kubectl -n kubesphere-devops-system logs -l app=devops-jenkins

# Get Jenkins admin password
kubectl -n kubesphere-devops-system get secret devops-jenkins -o jsonpath='{.data.jenkins-admin-password}' | base64 -d

Pipeline Types

TypeDescriptionUse Case
GraphicalVisual pipeline editorSimple pipelines, no code
Jenkinsfile (SCM)Pipeline defined in repositoryVersion-controlled pipelines
Jenkinsfile (Inline)Pipeline defined in KubeSphereQuick testing
Multi-branchAuto-discovers branchesGitFlow, feature branches

Common Mistakes

MistakeFix
Pipeline fails with "No agent"Check Jenkins agent configuration
Cannot access Git repositoryVerify credentials and webhook setup
kubeconfig credentials failUse string type instead of kubeconfigContent (v1.2+)
Jenkins out of memoryIncrease Jenkins master resources
Pipeline hangsCheck agent pod status and resource limits

Version Compatibility

DevOpsJenkinsNotes
v1.2.x2.504.1 LTSkubernetes-cd plugin removed
v1.1.x2.346.3 LTSLegacy kubeconfigContent supported

References

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Manage FrontendExtension resources in frontend-forge, from creation and package generation to downloading, publishing, and unpublishing. Inspect generated files, Kubernetes jobs, and status information to diagnose packaging or publishing failures.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Create or update a FrontendExtension
  • Rebuild and download an extension package
  • Publish, unpublish, or remove an extension
kubesphere/kubesphere1.7만2026년 7월 15일 업데이트

Operate FrontendIntegration resources from existing YAML definitions using kubectl, the Kubernetes command-line tool. Manage updates and enabled state, inspect build output, troubleshoot failures, and install or manage the frontend-forge extension.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Create a FrontendIntegration from existing YAML
  • Update, enable, or disable a FrontendIntegration
  • Inspect build output and troubleshoot failures
kubesphere/kubesphere1.7만2026년 7월 15일 업데이트

Generate FrontendIntegration YAML for frontend-forge from a simplified configuration containing one menu and one or more pages. Define resource tables or embedded iframe pages, with the bundled generator expanding menu placements into the required YAML structure.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Generating integration YAML for a CRD resource table
  • Defining an embedded iframe page
  • Converting a single-menu configuration into canonical YAML
kubesphere/kubesphere1.7만2026년 7월 15일 업데이트

kubeeye

무료

Set up KubeEye in KubeSphere to inspect Kubernetes clusters. Define checks for configurations, nodes, and services, schedule recurring or one-time inspections, and retrieve findings as HTML or spreadsheet reports.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Install KubeEye for cluster inspections
  • Create checks for node health and configuration
  • Schedule recurring cluster inspections
kubesphere/kubesphere1.7만2026년 7월 15일 업데이트

Inspect KubeSphere clusters with read-only commands. List clusters, view detailed configuration, identify host and member roles, and review connection types, readiness indicators, and KubeSphere and Kubernetes versions without changing cluster resources.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • List clusters registered in KubeSphere
  • Check cluster readiness
  • Review KubeSphere and Kubernetes versions
kubesphere/kubesphere1.7만2026년 7월 15일 업데이트

Understand KubeSphere architecture and call its APIs with a script that handles authentication. This skill also directs cluster, user, workspace, and extension management requests to the relevant specialist skills.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Understand KubeSphere core components
  • Choose API paths for Kubernetes and KubeSphere operations
  • Send API requests to a specific member cluster
kubesphere/kubesphere1.7만2026년 7월 15일 업데이트

kubesphere의 스킬 모두 보기

이 스킬의 문제 신고