Question about Jenkins kubernetes plugin

66 views
Skip to first unread message

Akagi Norio

unread,
Oct 24, 2016, 11:52:12 AM10/24/16
to Jenkins Users
Hi,

I'm trying to use Jenkins kubernetes plugin and want to make sure that if this works even if Jenkins master is not inside a k8s cluster.
On all example on the internet I could find, people set a k8s api server's address as a kubernetes service url, which can be resolved only within a cluster.

In my case I want to manage several k8s clusters (dev, stg, prod) from Jenkins so Jenkins is outside of each cluster.
Although I put k8s API's reachable address from external, "test connection" always shows "no route to host" errors.

I checked my firewall setting but could not find a problem. I want to confirm if my approach is valid.

Thanks,
Norio Akagi

Akagi Norio

unread,
Oct 25, 2016, 3:58:01 PM10/25/16
to Jenkins Users
I noticed that this happens because on my Ubuntu, a subnet of Docker network and one of k8s (which resides on another VPC on AWS) is overlapped. It's now resolved.
Thanks!

JonathanRRogers

unread,
Nov 18, 2016, 3:22:22 PM11/18/16
to Jenkins Users

Yes, the Kubernetes plugin (plugin id "kubernetes") works whether the Jenkins host is part of the cluster or not, though configuration is more automatic when the Jenkins host is in the cluster. As you probably know, "no route to host" is an error from the IP layer. Can you connect to the Kubernetes URL from any host outside the cluster, such as via kubectl from your personal machine?  From the Jenkins host, try pinging the host name or IP address from the Kubernetes URL. Try connecting to the URL manually using a tool like curl. Once you are able to get a response that way, move on to configuring Jenkins.
Reply all
Reply to author
Forward
0 new messages