DevOps Engineer interview questions
100 real questions with model answers and explanations for Senior candidates.
See a DevOps Engineer resume example →Practice with flashcards
Spaced repetition · Hunter Pass
Questions
I would use reusable pipeline templates with independent service builds and build each commit only once.
- Pull requests run affected lint, unit, and policy checks in under five minutes using dependency-aware caching.
- Merge builds an immutable image, scans it with Trivy, signs it with Cosign, and promotes the same digest through environments.
- Production uses automated canaries with SLO gates, while runner concurrency and deployment queues are sized for the measured 600-deploy peak.
Why interviewers ask this: The interviewer checks whether the candidate can turn delivery volume and latency into a secure, reusable pipeline architecture.
I would build only the affected dependency graph and make cache keys reproducible from inputs.
- Bazel, Nx, or Pants can map changed files to services and include reverse dependencies that need retesting.
- Remote caches store compiled layers and test outputs by source, lockfile, toolchain, and build configuration hash.
- A nightly full build catches graph mistakes, while pull-request p95 must fall below ten minutes without reducing required tests.
Why interviewers ask this: A strong answer combines change detection, correct cache invalidation, and a full-build safety net.
I would provision roughly 150 concurrent ephemeral runners, above the 100-runner average needed for that load.
- Autoscaling keeps about 20% warm capacity so queue p95 stays below two minutes during bursts.
- Untrusted pull requests run without cloud credentials on separate node pools or accounts from signed release jobs.
- Every job gets a clean VM or Pod, a 30-minute maximum lifetime, restricted egress, and no shared Docker socket.
Why interviewers ask this: The interviewer evaluates concurrency math, burst headroom, and security separation between trusted and untrusted jobs.
I would run green at full production capacity before shifting traffic, accepting temporary 2x compute cost.
- Green receives smoke and synthetic tests, then 5% shadow or live traffic while latency, errors, and saturation are compared with blue.
- The load balancer moves traffic in controlled steps and keeps connection draining below the ten-minute rollback window.
- Blue remains deployable and connected to a backward-compatible data layer until green holds SLOs for at least 30 minutes.
Why interviewers ask this: A strong answer makes capacity duplication, traffic control, data compatibility, and rollback timing explicit.
I would progress through 5%, 25%, 50%, and 100% traffic only while canary signals stay close to baseline.
- Each stage runs at least ten minutes and compares error rate, p95 latency, saturation, and a business metric such as checkout success.
- Automatic rollback triggers above 0.5% errors, a 20% latency regression, or two fast burn-rate windows.
- At least three canary replicas avoid judging one noisy instance, and the rollout pauses if sample volume is too small.
Why interviewers ask this: The interviewer checks whether canary stages, sample size, and rollback gates are numerically defensible.
I would use an expand-and-contract sequence split across at least three independently deployable changes.
- First add the nullable column or compatible default without a long table rewrite, then deploy code that writes both representations.
- Backfill in bounded batches while monitoring lock time, replica lag, and database CPU below agreed limits.
- Only after all readers use the new field does a later pipeline validate completeness, add the constraint, and remove the old path.
Why interviewers ask this: A strong answer integrates database compatibility and measured backfill safety into continuous delivery.
I would create one signed image digest after merge and promote metadata that references that digest.
- Tests, SBOM, provenance, and vulnerability results attach to the immutable digest in the registry.
- Environment-specific configuration stays outside the image in Helm values, Kustomize overlays, or runtime configuration.
- Admission rejects mutable tags in production, so all eight environments run the artifact that passed the earlier gates.
Why interviewers ask this: The interviewer evaluates artifact immutability and separation of deployable code from environment configuration.
I would make rollback a precomputed deployment action, not a rebuild or a manual manifest edit.
- The registry retains recent signed digests, and GitOps history records the exact image and configuration revision for every release.
- Database changes remain backward-compatible for at least one release window, otherwise application rollback is unsafe.
- A quarterly exercise rolls back representative services and measures traffic recovery below five minutes, including readiness and connection draining.
Why interviewers ask this: A strong answer treats rollback as an artifact, configuration, and data-compatibility capability that must be timed.
I would attack the 18-minute test path first because it dominates the critical path.
- Tests are split by historical duration across parallel workers, while flaky tests are quarantined with owners rather than blindly retried.
- BuildKit layer caching and prebuilt toolchain images reduce the six-minute build without weakening reproducibility.
- Deploy starts only after required gates, and p95 duration by stage proves whether the total stays below 12 minutes for two weeks.
Why interviewers ask this: The interviewer checks whether optimization follows measured critical-path time rather than generic pipeline tuning.
I would use native builders for each architecture and combine their manifests into one multi-architecture digest.
- BuildKit executes architecture-independent stages once where possible and shares remote cache layers across runner pools.
- Native arm64 runners avoid the large and variable emulation cost of QEMU on compile-heavy services.
- CI runs smoke tests on both images and accepts the design only if p95 build time stays under 18 minutes.
Why interviewers ask this: A strong answer balances multi-architecture correctness with native execution and reusable build layers.
The average demand is about 54 concurrent runners, so I would start near 80 to absorb bursts and maintenance.
- The calculation is 400 times eight divided by 60, then headroom is validated against arrival peaks rather than a flat hourly average.
- Autoscaling uses queue depth and oldest-job age, with a two-minute p95 queue target.
- Per-repository concurrency and cancellation of superseded commits stop one busy branch from consuming all 80 runners.
Why interviewers ask this: The interviewer evaluates basic capacity math plus fair scheduling and burst controls for a shared CI fleet.
I would use risk-based automated gates and reserve human approval for high-impact changes.
- Signed artifacts with passing tests, policy checks, and canary evidence can auto-promote for low-risk services.
- IAM, database, public-network, or tier-0 changes require two named approvers and an expiring deployment window.
- The platform records approver, digest, policy result, and rollback link, targeting under ten minutes median wait without weakening tier-0 control.
Why interviewers ask this: A strong answer scales governance by change risk and preserves an auditable production path.
I would publish small versioned modules and compose them into supported account and environment stacks.
- A VPC module owns networking primitives and outputs a stable contract, but does not also create EKS, databases, and application IAM.
- Opinionated wrapper modules provide approved defaults for the common path while exposing only inputs teams genuinely vary.
- CI tests examples, upgrade paths, policy compliance, and plans against at least two real account classes before release.
Why interviewers ask this: The interviewer checks module boundaries, supported defaults, and evidence that reusable IaC can evolve safely.
I would split state by lifecycle, blast radius, ownership, and change frequency rather than by arbitrary resource count.
- Network, shared identity, clusters, data services, and application stacks become separate states with explicit remote outputs.
- I avoid long chains of terraform_remote_state by publishing stable values through a parameter store or platform API where appropriate.
- Migration uses moved blocks or state moves in reviewed batches, with lock time and plan p95 targeted below five minutes.
Why interviewers ask this: A strong answer improves plan scale without replacing one monolith with a fragile graph of state dependencies.
I would use a remote encrypted backend with locking, versioning, audit logs, and narrowly scoped identities.
- S3 native lockfiles with versioning or Terraform Cloud prevent concurrent writes and retain recoverable state versions.
- Each state has a dedicated apply identity; plan jobs receive read access and short-lived OIDC credentials.
- CI serializes applies per state, times out stale locks through an audited procedure, and tests restoration quarterly.
Why interviewers ask this: The interviewer evaluates state durability, concurrency control, identity scope, and recoverability under real change volume.
I would use separate root configurations and state backends for account and production boundaries, not 90 CLI workspaces.
- Directory or generated-stack structure makes account, region, and environment visible in review and access policy.
- Production gets a distinct apply identity and approval path, so selecting the wrong workspace cannot target it.
- Workspaces remain useful for short-lived, identical preview environments where isolation and configuration truly match.
Why interviewers ask this: A strong answer chooses visible, access-controlled isolation for long-lived environments and limits workspaces to homogeneous copies.
I would run scheduled read-only plans per state and route actionable drift to the owning team.
- High-risk states plan hourly, ordinary states daily, and cloud audit events trigger targeted plans after console changes.
- The report separates provider normalization from real create, update, and delete actions to keep false positives below 5%.
- Emergency changes carry an owner and expiry, then are either imported into code or reverted within 24 hours.
Why interviewers ask this: The interviewer checks whether drift detection is frequent, attributable, low-noise, and connected to a remediation path.
I would publish a new major version and keep the old contract supported through a measured migration window.
- Upgrade tests run representative consumer plans and document state moves, renamed inputs, and provider-version requirements.
- Renovate or a similar bot opens pinned-version pull requests in cohorts of five consumers, starting with non-production.
- The old major is removed only after all 60 states migrate and rollback instructions have been exercised once.
Why interviewers ask this: A strong answer treats a module as a versioned product with consumer testing and controlled migration.
I would generate the plan from the reviewed commit and apply that exact approved plan with a short-lived production identity.
- CI stores the binary plan, human-readable summary, provider lockfile, and commit SHA as one immutable review artifact.
- Apply refuses a changed branch head, stale plan, policy failure, or expired approval instead of silently replanning.
- Production plans expire after a short window such as four hours because external state may change underneath them.
Why interviewers ask this: The interviewer evaluates review integrity and prevention of applying infrastructure different from what was approved.
I would migrate by service boundary and risk tier, not attempt one bulk import.
- Inventory and cloud tags establish owner, dependencies, and whether each resource should be imported, replaced, or retired.
- Generated import blocks accelerate capture, but every imported state must reach a zero-change plan before normal applies begin.
- Cohorts start with non-production and target about 100 resources per week while monitoring unintended replacement and access changes.
Why interviewers ask this: A strong answer combines inventory, import verification, and a sustainable migration rate for existing infrastructure.
Locked questions
- 21
Forty teams know TypeScript, but the platform group operates 15,000 Terraform resources. Would you add CDK or Pulumi?
terraformiactypescript - 22
Security requires every new cloud database to be encrypted, private, and backed up for 30 days. Where do you enforce it in IaC?
databaseencryptioniac - 23
Design Prometheus monitoring for 30 Kubernetes clusters producing 12 million active series with 13 months of retention.
kubernetesmonitoringdesign - 24
Your platform ingests 20 TB of logs per day from 800 services. How would you design storage and querying?
queriesdesign - 25
A tracing backend cannot store all 2 million spans per second. What sampling architecture would you use?
samplingarchitecture - 26
How would you deploy OpenTelemetry collectors for 500 services across 20 clusters without one global bottleneck?
deploymentobservabilitytracking - 27
Define SLIs for a checkout API handling 5,000 requests per second with a 99.95% availability target.
api - 28
A service has a 99.9% monthly availability SLO. How much error budget does it have, and how would releases consume it?
reliabilityslo - 29
Design burn-rate alerts for a 99.9% SLO without paging on every short error spike.
designsloalerting - 30
Prometheus grows from 4 million to 18 million series after teams add user_id labels. What guardrails would you design?
guardrailsdesignmonitoring - 31
Metrics, logs, and traces cost $140,000 per month. How would you set retention without weakening a 90-day audit requirement?
retentionmonitoring - 32
A release dashboard compares 2 versions but cannot connect errors to traces or the deployed digest. How would you redesign telemetry correlation?
correlationdeployment - 33
You are building an internal developer platform for 300 engineers and have 90 days for the first release. What do you ship?
- 34
Design a golden path for 80 Go services that currently take five days to reach production.
design - 35
A 500-engineer organization wants Backstage, but its service catalog is only 40% accurate. What would you implement first?
- 36
Teams request 50 development databases per day. How would you provide self-service without giving them unrestricted cloud access?
database - 37
Design a Crossplane platform API for three clouds without exposing 200 provider fields to application teams.
designapiiac - 38
How would you measure an internal platform used by 45 teams instead of counting shipped features?
- 39
A product must run on AWS and GCP, but 85% of workloads use only basic compute, database, and object storage. What should the platform abstract?
database - 40
GitHub Actions deploys to 25 AWS accounts using year-long access keys. Design the OIDC replacement.
ci-cddeploymentdesign - 41
Two hundred services need database credentials rotated every hour. How would Vault deliver them?
databasesecrets - 42
ArgoCD manages 20 clusters, and security forbids plaintext secrets in Git. Would you choose SOPS or External Secrets?
gitgitopssecrets - 43
Design software supply-chain controls for 300 container builds per day without adding more than three minutes to CI.
designcontainers - 44
Public pull requests need CI, but release runners can deploy to 12 production accounts. How do you prevent credential theft?
code-reviewdeployment - 45
Design ArgoCD repository structure for 100 teams, 20 clusters, and four environments without one root application controlling everything.
designgitops - 46
A release must move through 3 environments while preserving one image digest. How would GitOps promotion work?
gitops - 47
An application needs a database migration, Deployment, and smoke test in a 15-minute ArgoCD sync. How do you order it?
databasemigrationsdeployment - 48
ArgoCD detects 300 drifted resources per day, but 70% are fields mutated by other controllers. How would you configure sync safely?
configiacgitops - 49
A container registry holds 200 TB, grows 12 TB monthly, and must preserve every production artifact for one year. What retention policy would you use?
containersartifactsregistries - 50
Teams in three regions pull 8 TB of images daily from one registry, and deployments must work during a regional outage. What architecture would you choose?
deploymentregistriesarchitecture - 51
A canary passed at 5% traffic, but after promotion checkout errors rose from 0.2% to 3%. What do you roll back and inspect?
deployment-strategiesrollback - 52
A release keeps error rate flat but raises API p99 from 240 ms to 1.8 seconds at 50% traffic. Do you promote?
api - 53
Deployments fail because a database migration takes 22 minutes while the pipeline timeout is 15. How do you recover?
databasemigrationsdeployment - 54
A feature flag enables new code for 30% of users, and errors jump to 6% without a new deploy. What is your rollback path?
deploymentfeature-flagsrollback - 55
Build time for a monorepo rises from 11 to 46 minutes in one week. How do you find the regression?
monorepo - 56
CI queue p95 grows from 2 to 35 minutes during business hours, but runner CPU averages only 40%. What do you inspect?
data-structures - 57
A remote build cache hit rate drops from 82% to 9% after a toolchain update. How do you restore it safely?
caching - 58
Flaky tests fail 18% of pipelines, and teams rerun jobs until they pass. What do you change this week?
flakyci-cd - 59
Artifact uploads add 14 minutes to every build after image size grows from 600 MB to 4 GB. What do you do?
artifacts - 60
A runner image update breaks 70% of pipelines across 50 teams. How do you restore service?
ci-cd - 61
A manually opened security group creates a public database path for 47 minutes. Terraform does not detect it until the next day. What do you do?
databaseterraformnetworking - 62
Terraform plans replacement of 400 production resources after a provider upgrade. What is your decision process?
terraformconcurrency - 63
A Terraform apply loses its lock after creating 60 of 100 resources. Another pipeline is waiting. What do you do?
terraformci-cd - 64
A refactor moves Terraform resources between states, and production loses 12 IAM bindings. How do you recover?
refactoringterraform - 65
A drift job reports 3,000 changes, but 95% are provider-generated ordering noise. How do you recover signal?
iac - 66
A CI token with admin access to 18 AWS accounts is published in a public repository for 26 minutes. What happens first?
tokens - 67
A database password is found in 240 commits and 35 release artifacts. Deleting the latest file is not enough. What do you do?
databasepasswordsartifacts - 68
A GitHub OIDC trust policy accidentally allows every repository in the organization to assume a production role. How do you contain it?
- 69
Vault is unavailable for 25 minutes, and credentials for 80 services begin expiring. How do you keep services running safely?
secrets - 70
Trivy blocks 65% of builds after a vulnerability database update, including 900 findings with no available fix. What do you change?
databasevulnerabilities - 71
During a 40-minute checkout outage, you have CPU and error metrics but no queue-depth metric. How do you close the observability gap?
observabilitymonitoringdata-structures - 72
API p99 triples after a deploy, but only 4% of requests have traces and none cover the slow endpoint. What do you fix?
endpointsdeployment - 73
A logging pipeline drops 18% of production logs during peak traffic without paging anyone. How do you restore trust?
loggingci-cd - 74
Prometheus query p95 rises to 28 seconds during incidents, making dashboards unusable. What do you change first?
incidentsqueriesmonitoring - 75
The platform sends 600 alerts per day, but only 14 require action. What do you remove first?
alerting - 76
Self-hosted runner cost jumps from $70,000 to $190,000 per month while job volume grows only 8%. How do you investigate?
ci-cd - 77
A CI job downloads 6 GB of dependencies 20,000 times per month, creating a $38,000 network bill. What do you change?
dependencies - 78
Observability spend grows from $110,000 to $260,000 per month after three teams add high-cardinality labels. What do you do?
observability - 79
Log storage reaches 4 PB and grows 200 TB per month, but searches older than 14 days represent 0.3% of queries. What do you change?
queries - 80
A release creates 900 idle GPU instances overnight and adds $54,000 before detection. How do you contain and prevent it?
- 81
At 02:00 the artifact registry returns 503 for 70% of pulls, blocking all new Pods. You are platform on-call. What do you do?
artifactsregistrieson-call - 82
At 03:00 Terraform Cloud cannot start applies, and a network fix is waiting for production. How do you decide on break-glass?
terraform - 83
A platform API used by 45 teams returns 30% errors after its certificate rotates. How do you lead the on-call response?
on-callapi - 84
The error budget is exhausted, but marketing wants a launch expected to triple traffic tomorrow. What recommendation do you make?
reliability - 85
A chaos test terminates one availability zone and recovery takes 19 minutes against a five-minute objective. What happens next?
availability - 86
Traffic forecasting predicted 30% growth, but a partner launch creates 4x load and exhausts capacity in 12 minutes. What do you change?
capacity - 87
The platform team spends 140 hours per month manually provisioning access that takes 25 minutes per request. What do you automate?
- 88
A Jenkins migration moves 80 of 800 jobs, but failure rate rises from 2% to 14%. Do you continue?
migrations - 89
During VM-to-Kubernetes cutover, 10% traffic produces 4% errors while the VM path stays at 0.3%. What do you do?
kubernetes - 90
A 2 TB PostgreSQL cross-cloud migration reaches cutover with 18 minutes of replica lag against a five-minute window. Do you proceed?
postgresmigrationsreplication - 91
An ArgoCD sync unexpectedly deletes 120 resources because an ApplicationSet generator returns an empty list. What do you do?
gitopsgenerators - 92
An ArgoCD PreSync hook hangs for 20 minutes and blocks 60 application releases. How do you recover?
hooksgitops - 93
A critical CVE appears four hours before release, affects 300 images, and has no patch. What standard do you apply?
- 94
Fifty teams have unique pipelines, and a shared security fix reaches only 12 after two weeks. How do you standardize now?
ci-cd - 95
A strong operations engineer resolves 20 pages per month but repeats the same manual fix. How do you mentor them?
mentoring - 96
A mid-level engineer wants to apply a Terraform plan with 30 replacements to meet a deadline. How do you coach the decision?
estimationterraform - 97
A six-person team has one Vault expert, and that person handled 9 of the last 10 secret incidents. What do you change this quarter?
secretsincidents - 98
During a sev1 affecting 40% of customers, an executive posts fixes every two minutes and asks for constant updates. How do you handle it?
soft-skills - 99
The CFO requires a 40% infrastructure cut, but 99.95% SLO services already use 70% of peak capacity. What do you propose?
capacityslo - 100
An AI-generated Terraform pull request proposes 180 resources and passes syntax checks, but 12 IAM policies contain wildcards. What standard do you enforce?
code-reviewterraform