Jenkins not able to schedule task on kubernetes

7/5/2019

I'm using kubernetes plugin in jenkins to do the testing on kubernetes cluster through jenkins pipeline as code. The cluster details change frequently, so I'm configuring the kubernetes plugin through groovy scripts just before the testing stage.

Problem : Jenkins is not able to create pod for testing on the cluster. If I check the configuration of that particular kubernetes cloud in the configure system console, it is as per expectation (the IP, token, jenkins url etc).'Test Connection' is also successful. Tried adding sleep time after configuring the plugin, but no luck. Any idea what could be happening here?

Thanks in advance!

If I manually create a new kubernetes cloud through console and copy the same details manually, the pipeline is able to create the pods and perform tasks further.

Jenkins logs: 
  [Pipeline] podTemplate
  [Pipeline] {
  [Pipeline] node
  Still waiting to schedule task
  All nodes of label ‘XXXXXX-bdd-runner-21-XXXXXXX’ are offline.


Jenkins version: 2.150.3
Kubernetes plugin version: 1.14.5
-- PinkLeo
jenkins
jenkins-pipeline
jenkins-plugins
kubernetes

0 Answers