Is it bad practice to have a Jenkins Docker container to handle CI/CD inside the Kubernetes cluster itself?

Viewed 165

I've got my K8 cluster which I need to update with new deployments. If I had my jenkins container inside the kluster itself, is this bad practice? The other option is to have a seperate server that ssh's inside my remote K8 cluster and handles new deployments then.

I've looked at this jenkins plugin https://plugins.jenkins.io/kubernetes-cd/ to handle the CI/CD process.

1 Answers

It is a good practice to use CI/CD - good start. I wouldn't say it is a "bad practice" to run Jenkins as a container on Kubernetes - but my experience is that it does not work very well, mostly because Jenkins is not designed for being run as a container on Kubernetes.

There are more modern alternatives, that is designed for containers and Kubernetes. Jenkins X is the next-gen version of Jenkins that is designed to be run on Kubernetes, see Serverless Jenkins with Jenkins X on how it is different from Jenkins.

Jenkins X is built on-top of Tekton, another Kubernetes native CI/CD project and Tekton can be run standalone as well, using Tekton Pipelines, Tekton Triggers and Tekton Dashboard. Tekton is a very active community, backed by Google and Red Hat and more companies to provide a great CI/CD solution designed to work on Kubernetes.

Related