Jenkins k8s plugin to use dynamic slaves in Rancher k8s


#1

Hello,

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
( https://plugins.jenkins.io/kubernetes )

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.

Thanks,
skuzie


#2

Hey skuzie, did you find any solution?


#3

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.


#4

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: https://stackoverflow.com/questions/54628408