Client Master trying to connect to Kubernetes managed agents


I am unable to use Kubernetes agents from a traditional Client Master attached to CJOC.

The Client Master logs show something similar to:

2019-06-14 15:15:00.950+0000 [id=59]	INFO	o.c.j.p.k.KubernetesCloud#provision: Template for label my-kubernetes-agent-48223671-ee1c-4b8f-a640-048581019ce1: Kubernetes Pod Template
2019-06-14 15:15:00.951+0000 [id=59]	WARNING	o.c.j.p.k.KubernetesCloud#provision: Failed to connect to Kubernetes at : kubernetes.default.svc

Where my-kubernetes-agent is the agent you are trying to connect to.

The issue is that the Client Master is trying to provision a new Kubernetes agent, using the Cloud configured in CJOC, but, as the Client Master is not actually part of the cluster, it’s unable to connect to Kubernetes namespace (at : kubernetes.default.svc).

The Operations Center and any Managed Masters are created within the Kubernetes namespace, so they are able to connect.

It looks to be mentioned (briefly) in the documentation:

Existing masters that are connected to Operations Center lack key benefits of Managed Masters like high availability and automatic agent management. Whenever possible, administrators should use a Managed Master with CloudBees Core rather than connecting an existing master.



Unfortunately, Client Masters cannot use the Kubernetes automatic agent management system.

You can utilize Kubernetes agents using either a Managed Master or Team Master (they will be running inside of the Kubernetes cluster).

Have more questions?


Please sign in to leave a comment.