I am newbie for using Jenkins on Kubernetes. I have installed using helm stable chart for Jenkins. I can create and execute Job.
Below are the pain areas:
Also few terms in Jenkins are no explanable in official documentation-
i. idleMinutes
ii. instanceCap
iii. activeDeadlineSeconds
iv. slaveConnectTimeout
For a declarative pipeline you would use idleMinutes to keep the pod longer
pipeline {
agent {
kubernetes {
label "myPod"
defaultContainer 'docker'
yaml readTrusted('kubeSpec.yaml')
idleMinutes 30
}
}
the idea is to keep the pod alive for a certain time for jobs that are triggered often, the one watching master branch for instance. That way if developers are on rampage pushing on master, the build will be fast. When devs are done we don't need the pod to be up forever and we don't want to pay extra resources for nothing so we let the pod kill itself