The controller needs to provision agents in three Kubernetes clusters in different regions. How do you configure it?
AdvancedScenarioPlatform: plugins, JCasC & Kubernetes agents
Answer
Situation read → Multiple clouds in the kubernetes plugin, external API access.
What I'd do →
- Define three
kubernetesclouds in JCasC, each withserverUrl,serverCertificate,namespaceand a credential (service account token or kubeconfig as a Secret file credential). - Set
jenkinsUrlto the public HTTPS URL andwebSocket: trueso remote pods connect through the ingress. - Give each cloud distinct pod template labels (
k8s-eu,k8s-us) and set capacity limits. - Create RBAC in each cluster for the Jenkins service account in the agents namespace.
Why → WebSocket over HTTPS avoids exposing TCP 50000 across regions.
Interview tip → Mention that one controller across regions still has one point of failure; consider regional controllers.
More on Platform: plugins, JCasC & Kubernetes agents
You inherit a controller with 230 plugins, half unused, on a version two LTS lines behind. Plan the cleanup and upgrade.AdvancedAn admin changes a cloud setting in the UI, and it reverts after the next controller restart. Developers are confused. What is your policy?BeginnerYou must stand up a new Jenkins controller for a team in under an hour, identical to the existing ones. How?IntermediateBuilds wait 2–3 minutes before starting because new agent pods are slow to schedule. How do you speed up agent startup?AdvancedDevelopers need Docker image builds in Kubernetes agents, but the cluster runs containerd and security forbids privileged pods. What do you choose?AdvancedYou want to roll out a new version of the `jnlp` inbound-agent image to all pod templates. How?Beginner