Jenkins slaves in multiple kubernetes cluster

81 views
Skip to first unread message

don.cap...@gmail.com

unread,
Jan 4, 2019, 8:54:38 AM1/4/19
to Jenkins Users
Hi,
Not sure if this is even possible using the K8s plugin.
We stood up a new K8s cluster and added its IP in Jenkins master config: Cloud -> Kubernetes -> Kubernetes URL. 
Tested Connection is OK.

Filled the Jenkins URL with the Jenkins master IP, but when launching jobs, they're just stuck to the queue compared to running master/slave in a single K8s cluster.

Q: Is it even possible to run master on one K8s cluster and launch slaves on different clusters?
Or the plugin is designed to run master and slaves on the same cluster?

Thanks,
Don

Carlos Sanchez

unread,
Jan 4, 2019, 9:17:58 AM1/4/19
to Jenkins Users
you can run agents in another cluster. You need to check the logs of both master and pods to see if the pods can't connect back to the master

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/590802bf-e490-40ec-b7b8-21e090c2432e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

don.cap...@gmail.com

unread,
Jan 4, 2019, 9:26:37 AM1/4/19
to Jenkins Users
Does that mean there will be a pod for master on cluster1 and another pod for slave on cluster2?

Carlos Sanchez

unread,
Jan 4, 2019, 10:01:57 AM1/4/19
to Jenkins Users
master can be anywhere, on prem, vm, kubernetes,...
agents launch as pods

Don Capito

unread,
Jan 7, 2019, 3:07:34 AM1/7/19
to jenkins...@googlegroups.com
No joy. Regardless whether Kubernetes URL is set to cluster1  (ie, jenkins master pod) or cluster2 (jenkins slave) IP, the jenkins slave pods are still launched in cluster1.
Am I missing some setttings?

Carlos Sanchez

unread,
Jan 7, 2019, 3:46:29 AM1/7/19
to Jenkins Users

Don Capito

unread,
Jan 7, 2019, 6:57:51 AM1/7/19
to jenkins...@googlegroups.com
Yes, the master pod logs showed SUCCESSFUL whether the IP is cluster1 or cluster2. However, the slave pods are always launching in cluster1, regardless of what's set in Kubernetes URL. Seems the Kubernetes URL is not being used at all or if did it's overridden by cluster1 IP.

Reply all
Reply to author
Forward
0 new messages