Interview Prep/CI/CD/Jenkins Pipelines and Agents

Your Jenkins runs on one VM and that VM dies. How would you design for recovery?

AdvancedScenarioJenkins Pipelines and Agents
Answer

Situation read → Single point of failure with state in JENKINS_HOME.

What I'd do →

  1. Treat the controller as cattle: image with pinned plugins plus JCasC, jobs from Git (multibranch, Job DSL).
  2. Put JENKINS_HOME on durable storage (EBS/EFS or a PV) and snapshot it on a schedule; keep the secrets/ dir backed up and encrypted.
  3. Automate rebuild with Terraform/Helm; practise a restore drill.
  4. Note that open-source Jenkins is active/passive, not active/active; use a warm standby that mounts the same volume only if you can fence the primary.

Why → If config is in Git and state is in a snapshot, recovery time is minutes.

Interview tip → Be honest that OSS Jenkins does not scale horizontally per controller; teams split into several controllers.

All CI/CD questions

More on Jenkins Pipelines and Agents