All Products
Search
Document Center

Container Service for Kubernetes:Build and deploy applications with Jenkins on ACK

Last Updated:Jun 20, 2026

Jenkins is used to implement continuous integration and continuous deployment (CI/CD). You can deploy Jenkins in Container Service for Kubernetes (ACK) clusters to ensure high availability of services and reduce O&M costs. This topic describes how to deploy Jenkins in an ACK cluster, and then create and deploy a simple application.

Prerequisites

Precautions

No technical support is provided for Jenkins. The developers who use Jenkins need to maintain Jenkins.

Important

The Helm chart and container images for Jenkins originate from repositories outside Chinese mainland, which can cause image pull failures. You can use one of the following solutions:

Step 1: Deploy Jenkins

  1. Add 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 a namespace named cicd.

      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="<YOUR_SECURE_PASSWORD>" 
      • persistence.storageClass: Required. Specifies the storage class for the persistent volume that stores the jenkins_home directory. If you set this to "alicloud-disk-available", the system automatically selects an available cloud disk type.

      • persistence.size: Required. Specifies the size of the cloud disk. The minimum size for an Alibaba Cloud ECS cloud disk is 20 GiB.

      • controller.serviceType: Optional. Specifies the type of the service. The default is ClusterIP.

      • controller.admin.password: Optional. Specifies the password for the admin user. If not specified, Jenkins generates a random password.

      For more information about other parameters, see helm-charts.

    3. Check the status of the Jenkins pod and wait for it to enter the Running state.

      kubectl -n cicd get po

      Expected output:

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

    If you set the service type to LoadBalancer, use the external IP address to access the Jenkins dashboard in your 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) Step 2: Create a pipeline

This section uses the first-pipeline pipeline build as an example to demonstrate how to create a pipeline build. When you create a pipeline build, Jenkins dynamically launches a slave pod in the ACK cluster and runs the build by default. After Jenkins finishes running the build, it immediately releases the slave pod. For more information about Jenkins configurations, see Jenkins.

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

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

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

  4. In the left-side navigation pane, click Build Now to run the build.

  5. In the left-side navigation pane, click Build History. Click 1# to go to the pipeline details page and click Console Output to view the build results.

FAQ

How to retrieve the default Jenkins password?

If you did not specify a password during deployment, run the following command to retrieve the default password:

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