Pods for builds must pull images from a private registry. How do you configure it cleanly?
IntermediateScenarioPlatform: plugins, JCasC & Kubernetes agents
Answer
Situation read → Kubernetes pull secrets for agent pods.
What I'd do →
- Create a
docker-registrySecret in the agents namespace:kubectl -n jenkins-agents create secret docker-registry regcred \ --docker-server=registry.example.com --docker-username=ci --docker-password="$PASS" - Add
imagePullSecrets: [{name: regcred}]to the base pod template, or attach it to the agents' service account. - Prefer node-level registry auth (ECR credential helper, workload identity) in cloud clusters.
Why → Pull secrets are a cluster concern; Jenkins credentials are not involved in image pulls.
Interview tip → Distinguish pulling build images (cluster) from pushing built images (pipeline credentials).
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?AdvancedThe controller needs to provision agents in three Kubernetes clusters in different regions. How do you configure it?Advanced