DevOps · Interview and Career · Intermediate · 26 min read · FREE LESSON
DevOps Interview Scenarios: Pipelines, Culture, Incidents and Design Questions
Twelve realistic DevOps interview scenarios with a structure for answering, model responses, the follow-ups to expect and a rapid-fire question set, for engineers at every level.
A story to begin with
What interviewers are testing
| Area | What they look for |
|---|---|
| Delivery pipelines | CI/CD design, testing, release strategies, rollback |
| Infrastructure and automation | IaC, configuration, environments, state and drift |
| Culture and collaboration | Ownership, blamelessness, working across teams |
| Reliability and operations | Monitoring, incidents, on-call |
| Security | Secrets, supply chain, shift-left |
| Judgement | Trade-offs, prioritisation, honesty about limits |
A structure for any scenario
flowchart LR A[1. Clarify:<br/>goal, constraints, current state] --> B[2. Measure:<br/>what do the numbers say?] B --> C[3. Find the bottleneck<br/>or the root conditions] C --> D[4. Propose small, ordered steps<br/>with trade-offs] D --> E[5. Define how you will know<br/>it worked] E --> F[6. Mention risks,<br/>people and communication] style B fill:#6366f1,color:#fff style E fill:#34d399,color:#062
Scenario 1: Deployments are slow and unreliable
Approach: measure lead time stages (build, test, approval, deploy) and failure causes. Typical culprits: manual steps, slow serial tests, environment differences, large batches. Fix the largest delay first: automate the deployment, parallelise tests, make releases smaller, add verification and rollback. Measure: lead time, change failure rate, deployment frequency. Follow-up: "What if management wants it done in a month?" Pick the one change with the biggest effect and show the improvement, rather than promising everything.
Scenario 2: Design a CI/CD pipeline for a microservice
Answer: trigger on pull request and merge; build once; unit tests, lint and security scans; package an immutable artefact tagged with the commit; integration tests; deploy to staging automatically; smoke tests; progressive production rollout (canary) with automated verification of SLIs and automatic rollback; notifications and deploy markers. Mention secrets handling, caching, a build under ten minutes and pipeline as code.
Scenario 3: A production deployment broke checkout
Approach: mitigate first (rollback or turn off the feature flag), communicate status, then investigate with the deployment diff, logs, metrics and traces; fix forward through the pipeline; hold a blameless review; add the missing guardrail (a test, canary analysis, config validation). Follow-up: "How do you prevent it recurring?" Contributing-factor analysis with concrete actions and owners.
Scenario 4: Developers and operations blame each other
Approach: listen to both sides, find the structural causes (separate goals, handoffs, on-call that falls only on operations), introduce a shared goal and dashboard, shared on-call, a working agreement and a joint blameless review of the last incident. Start with one pair of teams.
Scenario 5: Infrastructure drift
Answer: detect with scheduled plan runs, find sources (console changes, hotfixes), move changes into code, restrict console write access, require pipeline-only applies, and alert on drift. Mention state locking and a break-glass procedure with audit.
Scenario 6: Secrets were committed to a repository
Answer: treat as compromised: revoke and rotate immediately, check access logs for misuse, remove from history if needed, add secret scanning (pre-commit and CI), move to a secret manager and short-lived credentials, and review why it happened without blame.
Scenario 7: Flaky tests are blocking the pipeline
Answer: measure flake rate and impact, quarantine flaky tests with owners and deadlines so main stays green, fix root causes (shared state, timing, external dependencies), run new tests repeatedly before merging, and report the flake rate monthly.
Scenario 8: Reduce the cloud bill by 30 percent
Answer: measure first (spend by team and service, idle resources, over-provisioning), tag for attribution, right-size, schedule non-production shutdown, use commitments and spot where suitable, delete orphaned resources, set budgets and alerts, and track unit cost. Protect reliability by checking SLOs before and after.
Scenario 9: Zero-downtime database migration
Answer: expand and contract: add new structures compatibly, dual-write, backfill, switch reads, remove old structures later; backups before each step; test on production-sized data; make each step reversible; use feature flags and gradual rollout.
Scenario 10: Start DevOps in a traditional company
Answer: build a business case and baseline metrics; map one value stream; secure a sponsor; pilot with one team for 90 days with a clear goal; share results; scale in waves with templates and coaching; align incentives. Emphasise listening and small wins.
Scenario 11: An on-call engineer is burning out
Answer: look at the data (pages per shift, night interruptions, noisy alerts), reduce noise and toil, expand the rotation, add compensation or time off, improve runbooks, ensure backup and escalation, and monitor the effects. Treat it as a system problem.
Scenario 12: Choose between a managed service and self-hosting
Answer: compare total cost including people, operational risk and skills, compliance, performance and lock-in. Default to managed for commodity capabilities; self-host where you need control and have the skills. Record the decision and revisit as scale changes.
Rapid-fire questions to rehearse
- What is CI, continuous delivery and continuous deployment?
- What are the DORA metrics?
- Blue-green vs canary vs rolling?
- What is infrastructure as code and why use it?
- Terraform state and drift?
- Mutable vs immutable infrastructure?
- What is a feature flag and what are its risks?
- How do you handle secrets in pipelines?
- What makes a good postmortem?
- What is trunk-based development?
- How do you reduce change failure rate?
- How do you measure DevOps success?
- What is shift-left security?
- What is a golden path?
- How do you design alerting that avoids fatigue?
Describing experience honestly
If you have not done something in production, say what you have done (a lab, a smaller version), how you would approach it at scale, and what you would verify first. Interviewers prefer honest reasoning to bluffing.
Using this in your organisation
flowchart LR A[Collect real delivery problems<br/>from your teams] --> B[Turn them into scenario cards] B --> C[Monthly practice session<br/>talk through one aloud] C --> D[Capture improvements<br/>to process and docs] style C fill:#6366f1,color:#fff
- Keep a library of scenario cards from your own anonymised incidents and slowdowns.
- Hold a monthly 45-minute discussion: one person presents, the group applies the six-step structure.
- Use the same structure when hiring, so interviews grade reasoning rather than tool trivia.
- Convert gaps found into documentation and automation tasks.
Interview questions
Q1. How would you improve a slow release process? Map the value stream, measure each stage, identify the biggest delay, make a small automated change, and measure lead time and failure rate again.
Q2. How do you decide what to automate first? Automate the steps that are most frequent, slowest, error-prone or block other work, weighted by effort, starting with the biggest bottleneck in the value stream.
Q3. How would you handle a failed release at midnight? Mitigate (roll back or flip the flag), communicate, preserve evidence, investigate after recovery, and run a blameless review with concrete follow-ups.
Q4. What would you do in your first month in a new DevOps role? Learn the systems and incident history, measure delivery baselines, meet the teams, fix one visible pain point, and propose a prioritised improvement plan.
Q5. How do you influence teams that do not report to you? Build trust through listening, offer solutions to their problems, demonstrate with a pilot and data, share credit and make the new way the easy way.
Next: unlock DevOps Career Paths and Preparation for a study plan and role guidance.