Jenkins k8s plugin to use dynamic slaves in Rancher k8s


I am trying to setup the dynamic jenkins slaves in the kubernetes cluster in Rancher.
The jenskins master is outside of kubernetes cluster and docker container.
It seems not connect from jenkins master to kubernetes cluster using “jenkins kubernetes plugin”

I am wondering if anyone have done this sort of setup?

The version of the setup :
Rancher1.6.15 with kubernetes 1.9.4
Jenkins 2.107.2 kubernetes plugin 1.6.0
( )

From Jenkins --> configure system -> cloud -> kubernetes,

  1. kubernetes URL… This is rancher api server end point? for ex, https://rancher:8080/r/projects/xxx/kubernetes:6443\api\v1
  2. kubernetes server certificate key : where do I get kubernetes server certificate key?
    my .kube/config only has user:token, not server certificate.

There is default service account running in kubernetes cluster.

Any help would be appreciated.


Hey skuzie, did you find any solution?

I still haven’t find the kubernetes server certificate, but I was able to connect to kubernetes cluster to create dynamic slaves from Jenkins Master.

Jenkins configuration : kubernetes cloud using authentication token.

Do you need to provide “Kubernetes server certificate key”? and what’s correct input for everything, can you provide sample with where does it come from?

I had related sto: