Interview Q&A · questions with model answers

DevOps Engineer Interview Questions

Part of the study plan for: DevOps Engineer · Site Reliability Engineer (SRE)

Ordered by how often they're asked. Most-asked answers are free to read in full; members see every answer and can rate their confidence on each.

  1. Most asked How do you secure the CI/CD pipeline itself against supply-chain attacks?

    Treat the pipeline as production infrastructure: pin third-party actions and plugins to commit SHAs, minimise and scope permissions (read-only tokens by default), isolate untrusted code (forked pull…

  2. Most asked How do you approach observability as a DevOps engineer?

    Make it part of the platform: standard instrumentation (OpenTelemetry) in service templates, structured logs with trace IDs, golden-signal dashboards and SLO-based alerts per service created by…

  3. Most asked How do you control cloud costs as part of DevOps (FinOps)?

    Make cost visible and owned: consistent tagging and allocation per team and service, dashboards and budgets with alerts, cost reviewed alongside performance in design and pull requests where…

  4. Most asked How do you implement GitOps for both infrastructure and applications?

    Keep desired state in Git: infrastructure as code (Terraform/OpenTofu) applied through PR-driven pipelines with reviewed plans, and Kubernetes manifests reconciled by an in-cluster agent (Argo CD or…

  5. Most asked How do you plan and test disaster recovery as a DevOps engineer?

    Agree on RTO and RPO per system with the business, choose a recovery strategy that meets them (backup and restore, pilot light, warm standby, active-active), automate the recovery steps…

  6. Most asked How would you introduce DevOps practices into a team that deploys manually once a month?

    Start by understanding the current flow and pain (value stream mapping), then automate the highest-friction steps incrementally: version control and CI with tests for every change, automated,…

  7. How do you implement automated rollback in a deployment pipeline?

    Define what "healthy" means with metrics (error rate, latency, saturation, business KPIs), roll out progressively, and let the deployment tool compare the new version against those thresholds and…

  8. How do you implement approval gates and separation of duties for production deployments?

    Require that the person who wrote a change isn't the only one who can ship it: protected branches with required reviews, a protected production environment in the CI/CD tool with required approvers…

  9. How do you integrate SonarQube, SAST, DAST and container image scanning into CI/CD without slowing everyone down?

    Run fast checks early and slow checks where they fit: secret scanning, SAST and dependency scanning on every pull request (incremental, only new issues), SonarQube's quality gate on new code, image…

  10. What would you monitor during a high-traffic event such as Black Friday, and how do you prepare?

    Monitor what customers experience and the bottlenecks behind it: checkout and payment success rate, error rates and latency per critical endpoint, traffic against planned capacity, autoscaling…

  11. How do you rotate production credentials without downtime?

    Make the system accept two valid credentials during the switch: create the new credential, deploy it to all consumers, confirm nothing uses the old one, then revoke it. Databases (dual users or…

  12. How do you prioritise several production incidents happening at the same time?

    Prioritise by customer and business impact, using agreed severity levels: a full checkout outage beats a degraded internal tool. Give each serious incident its own owner and channel, escalate for…

  13. How do you deal with flaky tests?

    Detect them (track tests that fail and pass on rerun), quarantine them out of the blocking path with an owner and a deadline so they do not erode trust in the pipeline, then fix the root cause:…

  14. How do you manage configuration across environments without drift?

    Keep configuration in version control alongside or near the code, separate per-environment values (overlays, values files, parameter stores) from shared defaults, inject configuration at runtime…

  15. How would you migrate a team from Jenkins to GitHub Actions (or another CI system)?

    Inventory existing jobs, plugins, credentials and integrations; define standard reusable workflows (templates) for common build types; migrate incrementally, running old and new pipelines in…

  16. How do you write reliable shell scripts for automation?

    Use set -euo pipefail (stop on errors, unset variables and failed pipeline steps), quote variables, validate inputs and dependencies at the start, make scripts idempotent, use trap for cleanup, log…

  17. How do you release a new version of a stateful service, such as a message broker or database, with minimal downtime?

    Use the service's replication and rolling-upgrade support: upgrade replicas or followers one at a time, check cluster health between steps, fail over leadership deliberately, and keep client…

  18. How do you manage TLS certificates across many services?

    Automate issuance and renewal (ACME/Let's Encrypt with cert-manager or Certbot, cloud certificate managers such as ACM integrated with load balancers, a private CA for internal mTLS), keep an…

  19. How do you make deployments of a monolith safer when you cannot break it up soon?

    Automate the build and deployment end to end, add a fast smoke-test suite and health checks, deploy with blue/green or rolling updates behind a load balancer so you can switch back instantly, use…

  20. How do you decide what to automate first?

    Prioritise by frequency multiplied by time spent, risk of human error, and how much the manual step blocks others: deployments, environment creation, recurring operational tasks and access requests…

  21. How do you structure on-call and incident handling in a DevOps team?

    Teams that build services also run them, with a sustainable rotation, clear escalation paths, actionable alerts with runbooks, defined incident roles and severity levels, and blameless postmortems…

  22. How do you approach a multi-cloud strategy?

    Be clear about the reason first: regulatory requirements, avoiding dependence on one vendor, using a specific service from another cloud, or acquisitions. True multi-cloud portability of every…

  23. How do you build golden machine images, and why?

    Use a tool such as HashiCorp Packer (or cloud image builders) in a pipeline to create images from a pinned base, apply hardening and install agents and dependencies, run tests, scan the result, and…

Was this page helpful?

Report a mistake