Builds in Kubernetes need a Maven cache, and downloads take 6 minutes per build. What do you implement?
IntermediateScenarioPlatform: plugins, JCasC & Kubernetes agents
Answer
Situation read → Ephemeral pods start with an empty ~/.m2.
What I'd do →
- Point Maven at a Nexus/Artifactory proxy inside the cluster via
settings.xmlmirror; this alone usually drops time to under a minute. - Optionally mount a shared PVC for
~/.m2/repository(ReadWriteMany), accepting concurrency risks, or a per-node cache. - Use
mvn -B -T 1Cand dependency:go-offline in a cached image layer for stable dependencies.
Why → A nearby proxy turns internet downloads into LAN transfers and adds resilience.
Interview tip → Mention that baking dependencies into the build image is another option for slow-changing deps.
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