All Products
Search
Document Center

Container Service for Kubernetes:Deploy Jenkins in an ACK Cluster and Complete Application Building and Deployment

Last Updated:Mar 11, 2026

Jenkins implements continuous integration and continuous deployment (CI/CD) processes. Deploy Jenkins in an ACK cluster to ensure high availability (HA) of services and reduce O&M costs. This topic describes how to deploy Jenkins in an ACK cluster and demonstrates its building and deployment procedure using a simple application example.

Prerequisites

Notes

Developers are responsible for maintaining the Jenkins system. This section does not provide enterprise-level technical support.

Important

The Helm Chart and images used by Jenkins are from overseas sources, which may cause pull failures. Refer to the following solutions:

Step 1: Deploy Jenkins

  1. Configure the Jenkins Helm repository.

    helm repo add jenkins https://charts.jenkins.io
    helm repo update

    Expected output:

    Hang tight while we grab the latest from your chart repositories...
    ...Successfully got an update from the "jenkins" chart repository
    Update Complete. ⎈Happy Helming!⎈
  2. Install Jenkins.

    1. Create the cicd namespace.

      kubectl create ns cicd
    2. Deploy Jenkins to the cicd namespace.

      helm -n cicd install jenkins jenkins/jenkins \
        --set persistence.storageClass="alicloud-disk-essd" \
        --set persistence.size="20Gi" \
        --set controller.serviceType="LoadBalancer"   \
        --set controller.admin.password="****" 
      • persistence.storageClass: Required. Creates a cloud disk persistent volume for persistent storage of the jenkins_home directory files. When set to "alicloud-disk-available", the system automatically selects an available cloud disk type.

      • persistence.size: Required. The cloud disk size. The minimum specification for Alibaba Cloud ECS cloud disks is 20 GiB.

      • controller.serviceType: Optional. The Service type. Default is ClusterIP.

      • controller.admin.password: Optional. Specifies the admin password. A random password is generated by default.

      For more deployment parameters, see helm-charts.

    3. Check and wait for the Jenkins pod to run normally.

      kubectl -n cicd get po

      Expected output:

      NAME        READY   STATUS    RESTARTS   AGE
      jenkins-0   2/2     Running   0          3m3s
  3. View the Service external IP address.

    If you deploy a LoadBalancer Service, access the Jenkins service through a browser.
    kubectl get -n cicd service

    Expected output:

    NAME            TYPE           CLUSTER-IP        EXTERNAL-IP     PORT(S)          AGE
    jenkins         LoadBalancer   192.168.***.***   8.222.***.***   8080:30949/TCP   2d17h
    jenkins-agent   ClusterIP      192.168.***.*     <none>          50000/TCP        2d17h

(Optional) Create a Pipeline Task

For example, create a first-pipeline pipeline task. When building a pipeline, Jenkins dynamically starts a Slave pod from the current ACK cluster by default and executes the build task. After the build task completes, it immediately releases the Slave pod. For more Jenkins configuration information, see Jenkins.

  1. Log on to Jenkins. In the navigation pane on the left, click New Item.

  2. In the Enter an item name area, enter the name first-pipeline, select the Pipeline type, and then click OK.

  3. At the top of the page, click the Pipeline tab, select the Hello World template, and then click Save.

    pipeline

  4. In the navigation pane on the left, click Build Now to execute the build.

  5. In the navigation pane on the left, click Build History, then click 1# to enter the pipeline details page, and then click Console Output to view the pipeline build results.

FAQ

How to Obtain the Default Random Jenkins Password?

If you do not specify a logon password when deploying Jenkins, execute the following command to obtain the default random Jenkins password.

kubectl -n cicd exec  -it svc/jenkins -c jenkins -- /bin/cat /run/secrets/additional/chart-admin-password && echo