All Products
Search
Document Center

Container Service for Kubernetes:Deploy Jenkins on an ACK Serverless cluster

Last Updated:Jun 24, 2026

Deploy Jenkins on an ACK Serverless cluster via Helm to run builds on dynamically provisioned pods.

Prerequisites

Considerations

You are responsible for maintaining Jenkins. Enterprise-level technical support is not provided.

Step 1: Deploy Jenkins

  1. Add and update 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!⎈
    Note

    The Helm repository is hosted outside the Chinese mainland. Updates from clusters in the Chinese mainland may take longer.

  2. Install Jenkins.

    1. Create the cicd namespace.

      kubectl create ns cicd
    2. Create a shared NAS storage volume.

      Without a persistent volume for the Jenkins home directory, configurations are lost on controller pod restart.

    3. Deploy Jenkins to the cicd namespace.

      helm -n cicd install jenkins jenkins/jenkins \
        --set persistence.existingClaim=pvc-nas \
        --set controller.serviceType="LoadBalancer"   \
        --set controller.adminPassword="admin"
      • persistence.existingClaim=pvc-nas: Required. The PVC name. This example uses pvc-nas in the cicd namespace.

      • controller.serviceType="LoadBalancer": Optional. The default service type is ClusterIP.

      • controller.adminPassword="admin": Optional. If unset, a random password is generated. See Access Jenkins via LoadBalancer and get the default password.

      See helm-charts for all deployment parameters.

    4. Check the Jenkins pod status. Wait until the pod enters the Running state.

      kubectl -n cicd get po

      Expected output:

      NAME        READY   STATUS    RESTARTS   AGE
      jenkins-0   2/2     Running   0          3m3s
  3. Open Jenkins in a browser and log on with your credentials.

Step 2: Create a pipeline task

This example creates a pipeline named first-pipeline. Jenkins provisions a dynamic slave pod for each build and releases it on completion. See the Jenkins documentation for configuration details.

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

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

  3. Click the Pipeline tab, select Hello World, and click Save.

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

  5. In Build History, click a build number such as #1. Click Console Output.

Access Jenkins and get the default password

  • The Jenkins service uses ClusterIP by default. To expose it via a load balancer:

    kubectl -n cicd patch svc jenkins -p '{"spec": {"type": "LoadBalancer"}}'
  • If no password was set during deployment, retrieve the default password:

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