DevOps interview questions: 27 questions with answer outlines
Technical, hands-on, behavioral and scenario questions for DevOps engineer roles, each with what the interviewer looks for and how to structure a strong answer.
Last updated 22 October 2026
What do DevOps engineer interviews test?
DevOps interviews test whether you can ship and run software safely: CI/CD pipeline design, Docker images, Kubernetes objects and probes, Terraform state, deployment strategies, secrets and observability. Expect a live troubleshooting scenario, an incident-response walkthrough, and behavioral questions about outages, automation and working with developers under pressure.
What are the top 27 DevOps interview questions?
Every question below is listed here with its type and level, then answered in full in the sections that follow. Select a question to jump to its answer outline.
Which technical DevOps questions come up most?
These check your grasp of the building blocks. Tool names are examples; interviewers usually care more about the principle than the vendor.
1. What is the difference between continuous integration, continuous delivery and continuous deployment?
Level: Entry. What the interviewer looks for: Precise definitions, especially the difference between delivery and deployment.
How to answer:
- Continuous integration: every change merges to the main branch often and is automatically built and tested.
- Continuous delivery: every change that passes the pipeline is releasable, but a person decides when to deploy to production.
- Continuous deployment: every passing change goes to production automatically, with no manual gate.
2. How do Docker image layers and build caching work, and how do you write a Dockerfile that builds fast?
Level: Mid. What the interviewer looks for: Understanding that a changed step invalidates the cache for every later step, and ordering instructions accordingly.
How to answer:
- Filesystem-changing instructions (RUN, COPY, ADD) create layers; when one step changes, every step after it is rebuilt.
- Copy dependency manifests and install dependencies before copying the source, so code changes do not reinstall packages.
- Use a
.dockerignoreto keep build context small and avoid busting the cache with irrelevant files. - Combine related RUN commands and clean package caches in the same step, because files deleted in a later layer still exist in the earlier one.
3. What is a multi-stage Docker build and why use one?
Level: Mid. What the interviewer looks for: Smaller, safer runtime images that exclude build tools.
How to answer:
- One Dockerfile with several FROM stages: build in a full image, then copy only the output into a minimal runtime image.
- Results in smaller images, faster pulls and a smaller attack surface because compilers and build secrets are left behind.
- Pair it with a non-root user and a pinned base image version.
4. Explain Pods, Deployments and Services in Kubernetes and how they relate.
Level: Entry. What the interviewer looks for: Correct roles of each object and how a Service finds Pods through labels.
How to answer:
- A Pod is the smallest deployable unit: one or more containers sharing a network namespace and volumes. Pods are disposable.
- A Deployment declares the desired number of replicas and the Pod template; it manages ReplicaSets to do rolling updates and rollbacks.
- A Service gives a stable virtual IP and DNS name and load-balances to the Pods matching its label selector; types include ClusterIP, NodePort and LoadBalancer.
5. What are liveness, readiness and startup probes, and what happens when each fails?
Level: Mid. What the interviewer looks for: The different consequences of each probe and the danger of a badly designed liveness probe.
How to answer:
- Liveness failure: the kubelet restarts the container.
- Readiness failure: the Pod is removed from Service endpoints and gets no traffic, but is not restarted.
- Startup probe: holds off the other probes until a slow-starting app is up; failure after its threshold restarts the container.
- Keep liveness checks simple; making them depend on a database can turn a database blip into a restart storm.
6. What are resource requests and limits in Kubernetes, and how do you set them?
Level: Mid. What the interviewer looks for: Scheduling versus enforcement, and different behavior for CPU and memory.
How to answer:
- Requests are what the scheduler reserves to place the Pod; limits are the maximum the container may use.
- Exceeding a CPU limit causes throttling; exceeding a memory limit gets the container OOM-killed.
- Set them from observed usage (metrics over time), then revisit; missing requests make scheduling and autoscaling unreliable.
7. What is Terraform state, and how do you manage it safely on a team?
Level: Mid. What the interviewer looks for: Why state exists, remote backends with locking, and treating state as sensitive.
How to answer:
- State maps resources in your configuration to real infrastructure, so Terraform can plan the difference.
- On a team, store it in a remote backend that supports locking (for example S3, GCS, Azure Storage or HCP Terraform) so two applies cannot run at once.
- State can contain secrets in plain text: encrypt it at rest, restrict access, and never commit it to Git.
- Change state through commands or
moved/importblocks rather than editing the file by hand.
8. Compare blue-green and canary deployments. When would you pick each?
Level: Mid. What the interviewer looks for: Mechanics, cost and risk profile of each, and the database compatibility caveat.
How to answer:
- Blue-green: run two full environments and switch all traffic at once; rollback is switching back, but it needs double capacity during the cutover.
- Canary: send a small share of traffic to the new version, watch metrics, then increase gradually; limits blast radius but needs good traffic routing and monitoring.
- Both need backward-compatible database changes, since old and new versions may run against the same schema.
9. How should secrets be handled in pipelines and Kubernetes?
Level: Mid. What the interviewer looks for: Keeping secrets out of code and images, least privilege, rotation, and knowing Kubernetes Secrets are not encrypted by default.
How to answer:
- Never commit secrets to Git or bake them into images; add secret scanning to CI.
- Use a secret manager (for example Vault or a cloud secrets manager) and short-lived credentials such as OIDC federation for CI jobs.
- Kubernetes Secrets are only base64-encoded; enable encryption at rest, restrict access with RBAC, or sync from an external manager.
- Rotate secrets and audit who can read them.
10. What do metrics, logs and traces each tell you, and how do you use them together?
Level: Entry. What the interviewer looks for: Distinct purposes of each signal and a workflow linking them.
How to answer:
- Metrics: cheap numeric time series for dashboards and alerts (rates, errors, latency, saturation).
- Logs: detailed records of individual events, best structured (JSON) with request IDs.
- Traces: the path and timing of a request across services, to find which hop is slow.
- Typical flow: an alert from metrics, a trace to find the slow service, logs to see why.
11. What is GitOps, and what are its benefits and drawbacks?
Level: Senior. What the interviewer looks for: The pull-based reconciliation model and realistic trade-offs.
How to answer:
- Git holds the desired state of the system; an agent in the cluster (for example Argo CD or Flux) continuously reconciles the cluster to match it.
- Benefits: audit trail through commits, review through pull requests, easy rollback by reverting, drift correction.
- Drawbacks: secrets need a separate solution, many repos or environments add complexity, and emergency changes must still go through Git.
12. A Linux server is slow. Which checks do you run first?
Level: Entry. What the interviewer looks for: A structured sweep of CPU, memory, disk and network rather than guessing.
How to answer:
- Load and CPU:
uptime,toporhtop; memory and swap:free -h,vmstat. - Disk space and I/O:
df -h,iostat; network:ss, connection counts, packet loss. - Logs:
journalctland application logs, and what changed recently on the box.
What hands-on DevOps questions should you expect?
These test how you apply the concepts: designing pipelines, debugging clusters, setting reliability targets and controlling access.
13. Design a CI/CD pipeline for a web service. What stages would you include and why?
Level: Mid. What the interviewer looks for: Fast feedback first, build once and promote the same artifact, and safe deployment with rollback.
How to answer:
- Lint and unit tests first for fast feedback, then build a versioned artifact or image once.
- Security checks (dependency and image scanning, secret scanning) and integration tests against that artifact.
- Promote the same artifact through staging to production instead of rebuilding per environment.
- Deploy with a strategy that allows quick rollback, and verify with smoke tests and monitoring.
14. A Pod is in CrashLoopBackOff. How do you debug it?
Level: Mid. What the interviewer looks for: A systematic order of commands and the common causes.
How to answer:
kubectl describe podfor events, exit codes and probe failures;kubectl logs --previousfor the crashed container’s output.- Common causes: application error at startup, missing config or Secret, wrong command, failing liveness probe, or OOMKilled (exit code 137) from a too-low memory limit.
- Check recent changes (image tag, config) and reproduce locally with the same image if needed.
15. What are SLIs, SLOs and error budgets, and how do they change alerting?
Level: Senior. What the interviewer looks for: User-centric reliability targets and alerting on symptoms, not on every cause.
How to answer:
- An SLI is a measured indicator of user experience (for example the share of requests that succeed within 300 ms).
- An SLO is the target for that SLI over a window (for example 99.9% over 30 days); the error budget is the allowed shortfall.
- Alert on fast error-budget burn rather than on CPU spikes; use the remaining budget to balance release speed against reliability.
16. What makes a good postmortem?
Level: Mid. What the interviewer looks for: Blameless culture and action items that are owned and tracked.
How to answer:
- Blameless: focus on how the system and process allowed the failure, not who made the mistake.
- Include impact, timeline, root cause and contributing factors, what went well and what did not.
- Action items with owners and dates, tracked to completion; share it widely so others learn.
17. How do you make a service scale automatically, and what can go wrong?
Level: Mid. What the interviewer looks for: Horizontal Pod and cluster scaling, the right signals, and downstream limits.
How to answer:
- Horizontal Pod Autoscaler adds Pods based on CPU, memory or custom metrics; a cluster autoscaler adds nodes when Pods cannot be scheduled.
- Scaling needs correct resource requests, stateless app design and readiness probes so new Pods only get traffic when ready.
- Watch for downstream bottlenecks (database connections), slow scale-up during spikes, and flapping without stabilization windows.
18. How do you apply least privilege in a cloud environment?
Level: Mid. What the interviewer looks for: Specific practices, not just the phrase.
How to answer:
- Separate roles per workload and environment, with only the actions and resources each needs.
- Prefer short-lived, role-based credentials over long-lived access keys; enforce MFA for people.
- Review permissions with access analysis tools and audit logs, and remove unused access.
Which behavioral questions do DevOps engineers get?
Answer with a real example in the STAR shape: situation, task, action, result. Interviewers listen for ownership and blameless thinking.
19. Tell me about a manual process you automated. What was the impact?
Level: Entry. What the interviewer looks for: Choosing something worth automating, a working result and a measured or observed benefit.
How to answer:
- Situation: what the manual process was, how often it ran and what it cost in time or errors.
- Action: the tools you used and how you made it reliable and reviewable.
- Result: time saved or errors avoided, described honestly, and how others adopted it.
20. Describe an incident you caused or contributed to. What did you learn?
Level: Mid. What the interviewer looks for: Ownership without defensiveness, and systemic improvements that followed.
How to answer:
- What change you made and how it led to the failure.
- How it was detected and mitigated, including your role.
- What changed afterwards: safeguards, tests, review steps or alerting that would catch it next time.
21. Tell me about a time developers pushed back on a process or tool you introduced.
Level: Mid. What the interviewer looks for: Empathy for developer experience and winning adoption through evidence and iteration.
How to answer:
- What you introduced and why it mattered (security, reliability, cost).
- How you listened to the objections and adjusted, for example by reducing friction or adding documentation.
- The adoption result and what you would do differently next time.
22. Describe a time you had to balance on-call interruptions with project work.
Level: Mid. What the interviewer looks for: Prioritization, communication with the team and reducing toil over time.
How to answer:
- The competing demands and the deadline involved.
- How you triaged, communicated trade-offs to your manager and protected focus time.
- What you did to reduce recurring pages afterwards.
How should you answer DevOps scenario questions?
These are hypothetical scenarios, often about production. Say what you would do first, how you would limit impact, and who you would tell.
23. Someone changed a resource by hand in the cloud console. How do you detect and handle the drift?
Level: Mid. What the interviewer looks for: Using plan to detect drift, deciding which side is correct, and preventing recurrence.
How to answer:
- Run
terraform plan(or a scheduled drift check) to see the difference between code and reality. - Decide with the person who made the change: either codify it in Terraform or let apply revert it.
- Prevent recurrence by limiting console write access and routing changes through pull requests.
24. Production is down and you are on call. Walk me through your first 30 minutes.
Level: Mid. What the interviewer looks for: Mitigate before diagnosing deeply, clear roles and regular communication.
How to answer:
- Acknowledge, assess impact and declare an incident; get an incident commander and a communications owner if it is serious.
- Look for recent changes and mitigate first: roll back, fail over, scale up or disable a feature flag.
- Post regular status updates to stakeholders and keep a timeline of actions.
- Once stable, hand off to a root-cause investigation and a postmortem.
25. The monthly cloud bill jumped 40% with no planned change. How do you investigate?
Level: Senior. What the interviewer looks for: Using billing data and tags methodically, then fixing both the cause and the visibility gap.
How to answer:
- Break down the cost explorer data by service, account, region and tag to find where the jump started.
- Common culprits: forgotten or oversized resources, data transfer, logging volume, autoscaling that did not scale back down.
- Fix the cause, then add budgets, anomaly alerts and tagging rules so it is caught earlier next time.
26. A deployment passed all tests but error rates rose 10 minutes after release. What do you do?
Level: Mid. What the interviewer looks for: Rolling back quickly without waiting for full diagnosis, then closing the test gap.
How to answer:
- Correlate the error rise with the release and roll back or shift traffic back if users are affected.
- Collect evidence (logs, traces, the diff between versions) while the old version serves traffic.
- Find why tests missed it (environment difference, data, load) and add a check, canary analysis or alert.
27. Your team wants to move a monolith running on VMs to Kubernetes. How do you evaluate and plan it?
Level: Senior. What the interviewer looks for: Questioning whether it is needed and planning an incremental, reversible migration.
How to answer:
- Start with the problem it should solve (deploy speed, scaling, cost) and whether a simpler platform would do.
- Assess readiness: config through environment, stateless processes, health endpoints, logs to stdout.
- Migrate incrementally with a staging cluster and a rollback path, and plan for the operational skills Kubernetes needs.
How should you prepare for a DevOps interview?
| When | What to do | Why it helps |
|---|---|---|
| 1 week before | Build a small project end to end: a Dockerfile with a multi-stage build, a CI pipeline that tests and builds it, a Kubernetes Deployment with probes, and Terraform for one cloud resource with remote state. | Hands-on questions are much easier when you have just hit and fixed the real errors yourself. |
| 1 week before | Prepare four or five STAR stories: an incident you handled, an outage you caused, something you automated, a time developers pushed back. | Incident and ownership stories come up in almost every DevOps interview. |
| 1 day before | Re-read the job ad and list the cloud, CI system and monitoring tools it names. Refresh the key commands for each, and check your setup if the interview is remote. | You can answer in the team’s own tooling instead of in general terms. |
| During the interview | In scenario questions, state your first priority (usually limiting user impact), then your diagnosis steps in order. Say which command you would run and what you expect to see. | Interviewers score a calm, ordered approach as much as the right answer. |
Where can you practice these DevOps questions?
Use the free mock interview practice tool, already set to DevOps, to answer timed questions and score yourself against a rubric for structure, relevance and depth. To build your own set of questions by level and type, open the interview question generator for DevOps.
How can Perimattic AI Interview help you prepare?
Perimattic AI Interview runs conversational mock interviews by role and level, with spoken or typed answers and feedback on each answer against a rubric for structure, relevance and depth. Hiring teams can run structured first-round interviews with the same questions for every candidate, with recorded answers and transcripts for human reviewers. People, not the AI, make hiring decisions.
Get started: Sign up and our team will walk you through Perimattic AI Interview for the way you prepare for or run interviews.
More interview questions
DevOps interviews, answered
Which tools should I know for a DevOps interview?
Most DevOps roles expect Linux, Git, one CI/CD system, Docker, Kubernetes, one infrastructure-as-code tool such as Terraform, one major cloud and a monitoring stack. You do not need all of them in depth: read the job ad, go deep on the tools it names, and be able to explain the principles behind the rest.
Do DevOps interviews include hands-on tasks?
Often. Common formats are debugging a broken container or Kubernetes deployment, writing a small pipeline or Dockerfile, or a whiteboard design of a deployment process. Practice explaining each command as you run it, and say what you would check next if a step fails.
How should I answer salary questions in a DevOps interview?
This page does not quote salary figures, because DevOps pay varies widely by city, company, cloud skills and on-call duties. Research current ranges for the role and location from recent job postings and salary surveys, give a range rather than a single number, and ask whether on-call is paid separately.
Want to rehearse DevOps interviews out loud?
Sign up to tell us how you prepare for or run interviews, and our team will get in touch to walk you through Perimattic AI Interview.
Sign up