0
votes

I am trying to install Jenkins in my kubernetes cluster. When I am exploring I found that in two ways. The first way that I understood is that, To install Jenkins master and slave. Here I found documentation for installing Jenkins master and slave agent on top of my kubernetes cluster. The second way that I found that usage of Kubernetes plugin for Jenkins.If we using this way , Installing only master and configuring the plugin. And Slave pod will automatically working when one deployment is creating.

Confusion

Here my confusion is that,

  1. In first method Do we need to define the worker machine for installing both master and slave ?
  2. In second method, Is this proper way of installing Jenkins , Since we only installing master and configuring the plugin to use the Jenkins slave agent? Is this standard way of using Jenkins in top of kubernetes cluster?

Can anyoen give clarification for my confusions please?

1
to simplify your setup, you could, potentially, use jenkinsx jenkins.io/blog/2018/03/19/introducing-jenkins-x and leverage that with gitops. you have to bear in mind that building docker images on kubernetes is not a thing.Victor Palade
Hi, try the jenkins-x.io its k8s native jenkinsSuresh Vishnoi
Yes. will try. I am now exploring. Thank you for your responses.Mr.DevEng

1 Answers

2
votes

I found this tutorial to be pretty helpful in getting jenkins running on my kubernetes cluster: https://github.com/GoogleCloudPlatform/continuous-deployment-on-kubernetes

It relies on the jenkins kubernetes plugin you mentioned. And if Google is doing it this way, its probably pretty safe to assume it is a valid method. It is the method I use on my cluster, where the jenkins master can provision slave pods as needed, which makes much more sense than keeping slaves alive that aren't being used.