<p>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.</p>

<p>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?</p>

<p>Thanks in advance!</p>

<p>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.</p>

<pre><code>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
</code></pre>

<p>I had this problem this week, I solved this by access by accessing: Manage Jenkins =&gt; Manage Nodes and Clouds =&gt; Configure Clouds =&gt; choose your kubernetes Cluster =&gt; Kubernetes Cloud details... =&gt; set Concurrency Limit to a bigger number(if your current is 10 set it to 20)</p>
