How to scale Jenkins slaves according to Build Queue on Kubernetes Plugin

9/2/2019

I'm running on the Jenkins pipeline, so I have set the value to Time in minutes to retain agent when idle in slave configuration after I have run my jobs my slave but when the other job needs to run if a slave agent is full, jobs are waiting on Build Queue.

How I can scale the my slave count on Jenkins with Kubernetes plugin?

-- Ayhan Balik
docker
jenkins
jenkins-plugins
kubernetes

1 Answer

9/5/2019

You're looking for the Container Cap setting, if you're using the Jenkins Configuration as Code (JCasC) plugin this is configured via the containerCapStr key.

-- cewood
Source: StackOverflow