Distributed Builds & Agent Management Flashcards
7 cards from real CJE practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 7 Distributed Builds & Agent Management flashcards as text
What is the Kubernetes Plugin for Jenkins primarily designed to do?
Answer: Dynamically provision and deprovision pod-based build agents in a Kubernetes cluster per build
The Kubernetes Plugin creates a Jenkins agent pod in a Kubernetes cluster for each build request and automatically destroys it when the build completes, providing elastic, ephemeral build infrastructure.
When using the Kubernetes Plugin in Jenkins, what does a 'Pod Template' define?
Answer: The containers, volumes, resource requests/limits, and settings used when creating an agent pod
A Pod Template is the blueprint the Kubernetes Plugin uses to create agent pods, specifying container images, resource limits, volume mounts, environment variables, and service account settings.
What is the effect of setting 'Retention Strategy: Always' for a Jenkins agent?
Answer: Jenkins keeps the agent connected and online at all times, reconnecting automatically if it disconnects
The 'Always' retention strategy instructs Jenkins to maintain the agent in an online state as persistently as possible, automatically attempting reconnection if the agent loses connectivity.
What is the purpose of the 'stash' and 'unstash' steps in Jenkins Pipelines?
Answer: To save a set of files from one stage's workspace and restore them in a later stage, even on a different agent
'stash' saves named file sets from the current workspace to the controller, and 'unstash' restores them in a subsequent stage — enabling file sharing between stages running on completely different agents.
Which characteristic best describes 'cloud agents' in Jenkins agent management?
Answer: Agents dynamically provisioned on cloud infrastructure on demand and terminated after builds complete
Cloud agents are ephemeral: they are dynamically created by a cloud provider plugin (EC2, GKE, Azure, Kubernetes) when builds require them and automatically terminated afterward, enabling elastic scaling.
In the Jenkins inbound agent architecture, which side initiates the TCP connection?
Answer: The agent initiates the TCP connection to the Jenkins controller
In the inbound (formerly JNLP) agent model, the agent process initiates the TCP connection to the controller's agent port (50000), which is critical for agents sitting behind firewalls that block inbound connections.
What happens to a Jenkins build if the agent it is running on becomes disconnected mid-build?
Answer: The build fails and is marked as aborted or failed; Jenkins cannot resume a build on a different agent
Jenkins cannot migrate or resume an in-progress build on a different agent; if the agent disconnects mid-build, the build is terminated and marked as failed or aborted.