How to setup scalable Jenkins on top of a EKS Cluster with persistent Volumes? How to setup scalable Jenkins on top of a EKS Cluster with persistent Volumes? kubernetes kubernetes

How to setup scalable Jenkins on top of a EKS Cluster with persistent Volumes?


From your description, I can't understand clearly if you have a Jenkins "master" on EKS installed/configured. Assume you already installed Jenkins via helm or "yaml" and you can access it from UI.

Next step will be to install a plugin in Jenkins, called ‘Kubernetes’. This plugin is designed to implement Jenkins scaling on top of a Kubernetes cluster(Jenkins slaves/nodes).

After you installed the plugin you have to configure it.

Go to:Manage Jenkins -> Configure System -> Cloud -> Kubernetes

Jenkins Slave configuration

  1. Nr.1 is the name of your Pod (you can pick a random name)
  2. Nr.2 is more important and you have to remember this name-label because you will use in your Jenkinsfile to call this pod/slave template.
  3. Nr.3 is the name of the container (by this name you can specify the desired container to use in a specific Jenkinsfile stage.
  4. Nr.4 this container has an image to behave like a Jenkins slave/node (used from dockerhub).

Here is how you call your Pod/slave template in Jenkinsfile:

 agent {   label "jenkins-slave"    }

Here is how you call a specific slave/container template into Jenkinsfile:

steps {   container('jenkins-slave') {   }}

For more descriptive steps feel free to Google it "How to install/configure Jenkins slave on EKS" you will get many many articles, such as this:How to install/configure Jenkins slave on EKS

Good luck!