I am trying to setup Jenkins Dynamic slaves creation using jenkins-kubernetes plugin.
My jenkins is running outside K8s Cluster.
Link: https://github.com/jenkinsci/kubernetes-plugin
My jenkins version is 2.60.2 and Kubernetes plugin version is 1.1.2
I followed the steps mention on the readme and successfully setup the connection.
And connection is successful.
Then I created a job with pod template :
Here starts the problem: 1. When I run this job initially it runs and jenkins slave container inside my pod not able to connect and throws:
I have enabled JNLP port(50000) not sure if it is the right port even tested with random option in Jenkins nothing worked.
2. Now I discarded this jenkins job and re run again it says:
Started by user Vaibhav Jain
[Pipeline] podTemplate
[Pipeline] {
[Pipeline] node
Still waiting to schedule task
Jenkins doesn’t have label defaultlabel
and no pod is getting started in kubernetes. This is weird.
I am not sure what I am doing wrong. Need help!