Jenkins unable to build on kubernetes setup

1.7k Views Asked by At

I have a problem with Jenkins build and this is what I am seeing in the build log:

[Pipeline] Start of Pipeline
[Pipeline] podTemplate
[Pipeline] {
[Pipeline] node
Still waiting to schedule task
‘Jenkins’ doesn’t have label ‘ci’

I am not sure what does that actually means.

I have tried to check the configuration under "Configure Clouds" in Jenkins and it looks like this:

enter image description here

enter image description here

1

There are 1 best solutions below

3
Dashrath Mundkar On

I would suggest few changes do it like this

  1. Keep everything blank for jenkins tunnel. Jenkins will automatically will pick it up.

  2. If you deployed this jenkins instance in kubernetes cluster then please use internal address for jenkins_url like http://jenkins.infrastructure.svc i assume your jenkins service name is jenkins and it is ClusterIP

  3. For Pod template you can just use name and labels and remove container template section. kubernetes will pick it up default.

  4. Please use the same label to schedule job as agent means you gave the label name different and using as diffrent means your jenkins looking for ci agent which is not present so you should replace with jenkins-jenkins-slave in your pipeline