Environment
-
CloudBees CI (CloudBees Core) on modern cloud platforms - Managed controller
-
CloudBees CI (CloudBees Core) on modern cloud platforms - Operations Center
-
CloudBees CI (CloudBees Core) on traditional platforms - Client controller
-
CloudBees CI (CloudBees Core) on traditional platforms - Operations Center
Resolution
The Kubernetes Plugin passes the Jenkins URL to the jnlp
container in agent pods as an environment variable and the agent process connects to Jenkins using the script: https://github.com/jenkinsci/docker-inbound-agent/blob/master/jenkins-agent.
By default, the Jenkins URL configured under manage
is used. In most cases, this is acceptable. But in some cases it is required that agents connect to a different endpoint, for example to connect through a specific proxy load balancer or via internal IP / hostnames.Kubernetes Plugin >= 1.28.4
The Kubernetes Plugin resolves the Jenkins URL from different sources in that order:
-
The "Jenkins URL" configured for the Kubernetes Cloud under
-
Otherwise if NOT using WebSocket AND no credentials provided:
-
the value of the System Property
KUBERNETES_JENKINS_URL
(i.e. passing-DKUBERNETES_JENKINS_URL
to the Jenkins startup arguments) -
Otherwise, the value of the Environment Variable
KUBERNETES_JENKINS_URL
-
-
If empty or not specified, the "Jenkins URL" configured under
See this method for more details.
Kubernetes Plugin < 1.28.4
The Kubernetes Plugin resolves the Jenkins URL from different sources in that order:
-
The "Jenkins URL" configured for the Kubernetes Cloud under
-
If empty or not specified, the value of the System Property
KUBERNETES_JENKINS_URL
(i.e. passing-DKUBERNETES_JENKINS_URL
to the Jenkins’s startup) -
If empty or not specified, the value of the Environment Variable
KUBERNETES_JENKINS_URL
-
If empty or not specified, the "Jenkins URL" configured under