Jenkins on Kubernetes Load Testing

4/13/2018

We are using Jenkins slaves on containers & have Kubernetes as our orchestrator. Jenkins Master is on a standalone instance. Now, for 5-6 parallel builds the set up is working just fine. However, we wanted to do some load testing to check how many parallel builds ie how many containers can we spin up in this set up.

Is there any tool out there for such testing ? Any recommended way ?

-- swetad90
jenkins
kubernetes

2 Answers

4/18/2018

Used the job DSL plugin for my usecase . THis creates different jobs based on repo you give and as many as you want. And once created, it builds it.

for(int i=0;i<101;i++){
createJob(i)
}
def createJob(int i){
pipelineJob("PerfTest-${i}") {
def repo = 'https://<bitbucket-url>'
  description("Pipeline for $repo")
   definition {
    cpsScm {
     scm {
       git {
         remote { 
               url(repo) 
               credentials('mycreds')
           }
         branches('refs/heads/perfTest')
         scriptPath('Jenkinsfile')
         extensions { }  
        }
      }
     }
  }
  queue("PerfTest-${i}") 
 }
 }
-- swetad90
Source: StackOverflow

4/13/2018

There are no tools to do this. Kubernetes spawns pods until resource depletion; when there is not enough resources, Kubernetes waits for free resources. So you can try to increase the numbers of parallel builds till it uses all resources, also you can monitor usage of resources in your monitoring system.

-- Nick Rak
Source: StackOverflow