Cloud Native 8 min read

Setting Up Jenkins CI/CD Pipelines on Kubernetes

This article explains how to set up and manage Jenkins CI/CD pipelines on Kubernetes, covering plugin installation, pod deployment, pipeline configuration, and best practices for continuous integration and delivery in a cloud‑native DevOps environment.

Cloud Native Technology Community
Cloud Native Technology Community
Cloud Native Technology Community
Setting Up Jenkins CI/CD Pipelines on Kubernetes

There are several ways to manage cloud infrastructure in a DevOps environment, which encourages rapid iteration and seamless integration of development, testing, and release processes.

Jenkins automates the integration of continuous integration (CI) and continuous delivery (CD) into the development workflow, optimizing the process.

Jenkins can be deployed as a pod in Kubernetes, allowing it to scale according to team needs.

Jenkins is synonymous with CI/CD and is a popular automation tool for building and deploying applications and micro‑services. With over 1,000 plugins, it integrates easily with systems such as Kubernetes, extending its capabilities.

Because of Jenkins’s native compatibility with Kubernetes, setting up a CI/CD pipeline is straightforward. Deploying Jenkins on Kubernetes offers advantages over VM‑based deployments, such as on‑demand Jenkins agents (slaves) instead of idle VM pools, and a master‑agent architecture that fully automates micro‑service creation, deployment, testing, and required environments.

Jenkins can be deployed using Helm, kubectl, or GUIs, after which the appropriate plugins must be configured (e.g., specifying where agents find the Jenkins master and which Docker images they use). Configuring Jenkins to work with the CI/CD workflow, including test and deployment parameters, enables a fully automated continuous delivery environment.

After Jenkins starts, you can configure a pipeline by accessing its Web UI (e.g., via minikube service jenkins), installing necessary plugins—especially the Kubernetes plugin—and setting up the pipeline definition.

The Kubernetes Continuous Deploy plugin handles creating new pods for testing and managing the transition between testing and deployment.

Once plugins are configured, Jenkins can restart and automatically apply the changes. Scripts such as install_plugins.sh embedded in the Jenkins Docker image or the config.xml file facilitate this process.

You can then create your first pipeline, assign credentials, and begin development within the pipeline. Remember that Jenkins does not automatically pull code from local storage; an initial push request may be required.

After creating the pipeline, you can run the application immediately by optimizing Minikube. Manual push requests are often convenient because they give you finer control over what code is pushed through the pipeline.

When you modify application code, Jenkins does not instantly update the deployment package; you must commit the changes and wait for Jenkins to fetch them before proceeding.

The Jenkins UI provides a “Build now” command to trigger a new build. After the build completes, subsequent runs of the application in Minikube will reflect the changes.

Jenkins pipelines can support multi‑team development, as pipelines are defined as code and any user with proper credentials can submit changes and trigger the defined processes.

The system is highly resilient: if a server crashes, the pipeline and its processes automatically recover, and Jenkins retains control over the managed clusters, eliminating the need for manual CI/CD configuration.

Jenkins’s ability to manage multiple pipelines gives administrators clear visibility, with features such as pause and resume that aid in managing micro‑services and large projects.

Additional valuable plugins include the Pipeline and Multibranch Pipeline plugins, which visualize CI/CD flows, allow definition of a Jenkinsfile in the repository, and enable version‑controlled pipeline configuration without relying on the GUI.

In summary, using Jenkins on Kubernetes provides a powerful CI/CD foundation: each build creates an on‑demand pod that is destroyed after completion, avoiding idle agents. This combination enhances CI/CD workflows for large development projects, leveraging the extensive Jenkins plugin ecosystem.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Cloud Nativeci/cdKubernetesDevOpsJenkins
Cloud Native Technology Community
Written by

Cloud Native Technology Community

The Cloud Native Technology Community, part of the CNBPA Cloud Native Technology Practice Alliance, focuses on evangelizing cutting‑edge cloud‑native technologies and practical implementations. It shares in‑depth content, case studies, and event/meetup information on containers, Kubernetes, DevOps, Service Mesh, and other cloud‑native tech, along with updates from the CNBPA alliance.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.