Home > other >  Does kubernetes-operator support Jenkins X like features?
Does kubernetes-operator support Jenkins X like features?

Time:12-15

My requirement is to trigger a CI & CD on a kubernetes on prem infra, whenever a PR has been raised. Jenkins X is an ideal candidate but unfortunately due to few proxy issues it didnt come to fruitition. Coming to kubernetes-operator, looking for few clarifications.

I've 4 nodes cluster, with one node being the leader.

  1. Do I've to set up a new instance of Jenkins before hand on my K8s cluster or kubernetes-operator does that for me ?
  2. Looking to access the Jenkins instance under the domain : jenkins.mybusinessunit.myorg.com/jenkins
  3. Do I have to do any addtional configurations to enable master - slave set up.
  4. Does kubernetes-operator provides a feature to support CI/CD model like Jenkins X ?

Thanks in advance.

CodePudding user response:

As per your comments you are actually interessted in more of a cloud-native solution to operating a Jenkins, so here goes.

Since you already have a Kubernetes cluster and would like to use the Jenkins Kubernetes operator, then I would recommend you use the Jenkins Kubernetes Plugin for managing your workloads.

The Jenkins Kubernetes plugin enables you to run each of your pipelines in a separate Pod in your Kubernetes cluster, and once the required Service resources are setup, then the communication between master and slave pods is completely regulated by the plugin. I would recommend that you look into their documentation, which is quite good ( in comparison to other plugins ).

Now since you are also using the Jenkins Kubernetes operator you should know that the plugin is installed as one of the default plugins and is available as soon as your Jenkins instance is spun up. I would recommend you read through the Jenkins Kubernetes operator documentation to get a better grasp of what happens when that is running.

So now I will move onto your questions.

  1. Do I've to set up a new instance of Jenkins before hand on my K8s cluster or kubernetes-operator does that for me ?

If you install the Jenkins Kubernetes operator via Helm chart, then no, you get a Jenkins master instance included. Otherwise if you install the controller into your cluster manually, then you will need to create a Jenkins CRD, which will create a Jenkins instance for you.

  1. Looking to access the Jenkins instance under the domain : jenkins.mybusinessunit.myorg.com/jenkins

Use Ingress Load Balancer DNS Service or expose the Pod via NodePort. Note that exposing your master Pod via NodePort may require you to make your Jenkins Master instance publicly available ( and that may not be wise ).

  1. Do I have to do any addtional configurations to enable master - slave set up.

Please refer to the documentation of Jenkins Kubernetes plugin and Jenkins Kubernetes operator. All details are provided there, but configuration is rather minimal.

  1. Does kubernetes-operator provides a feature to support CI/CD model like Jenkins X

No. The Jenkins Kubernetes operator is there only to manage your Jenkins instance and backups in immutable fashion. Jenkins X can be used in combination with Jenkins, but neither replaces the other completely.

  • Related