DevOps and SRE interviews are full of scenario questions. Instead of "what is a pod?", you will often hear "a deployment is stuck and users see errors, what do you do?" Interviewers use these questions to see how you think under pressure, how well you know the tools, and whether you can explain a messy situation clearly.
This guide groups the most common questions by area and explains what a strong answer covers. For free question banks to practice with, see our list of GitHub repositories for DevOps interview questions.
How to answer scenario questions
Use a simple structure for every troubleshooting question:
- Clarify the impact. Who is affected, since when, and how badly?
- Stabilize first. Roll back, scale up, or fail over if users are hurting.
- Gather evidence. Metrics, logs, recent deploys, and changes.
- Form and test a hypothesis. Narrow the problem step by step.
- Fix and verify. Confirm the fix with the same signals that showed the problem.
- Follow up. Postmortem, alert improvements, and prevention.
Saying "first I would check whether a deploy went out recently" is a better start than naming a tool. Most incidents follow changes.
Linux and operating systems
-
A server is slow. How do you investigate? Check load, CPU, memory, disk I/O, and network with standard tools such as
top,vmstat,iostat,free, andss. Look for a single runaway process, swap usage, or disk saturation. Check logs and recent changes. -
The disk is full. What do you do? Find large files and directories with
duanddf, check for deleted files still held open by a process withlsof, clean up or rotate logs, and then fix the cause, such as missing log rotation. - Explain the difference between a process and a thread.
-
What happens when you run a command in the shell? Mention parsing,
forkandexec, the environment, and file descriptors. - What are signals? Explain SIGTERM versus SIGKILL and why graceful shutdown matters in containers.
- How do file permissions work? Users, groups, read, write, execute, and special bits.
Networking
- What happens when you type a URL into a browser? DNS resolution, TCP handshake, TLS negotiation, the HTTP request, load balancers, and the response. Interviewers often stop you at one step and ask you to go deeper.
-
A service cannot reach another service. How do you debug it? DNS, routing, security groups or firewall rules, the port the service listens on, and TLS errors. Tools:
dig,curl -v,nc,traceroute. - TCP versus UDP, and examples where each fits.
- What does a load balancer do? Layer 4 versus layer 7, health checks, and session affinity.
- What is a reverse proxy?
Containers and Kubernetes
- What is the difference between an image and a container?
- How do you make a Docker image smaller and safer? Multi-stage builds, small base images, fewer layers, no secrets in the image, and running as a non-root user.
-
A pod is in CrashLoopBackOff. What do you do? Check
kubectl describe podfor events,kubectl logs --previousfor the last crash, configuration and secrets, resource limits that cause OOM kills, and failing liveness probes. - Explain deployments, services, and ingress.
- Liveness versus readiness probes, and what goes wrong when they are configured badly.
- How do requests and limits affect scheduling and stability?
- How would you do a zero downtime deployment? Rolling updates, readiness probes, connection draining, and backward compatible database migrations.
- How do you manage secrets in Kubernetes?
CI/CD
- Describe a pipeline you built. Cover build, test, security scanning, artifact storage, deployment stages, and rollback.
- How do you make builds faster? Caching dependencies, parallel jobs, and running only affected tests.
- Blue green versus canary deployments. When to use each and how to decide when a canary is healthy.
- How do you handle database migrations in a deployment pipeline?
- How do you keep secrets out of pipeline logs?
Infrastructure as code
- What is Terraform state, and why does it matter? Where it is stored, locking, and what happens when it drifts from reality.
- How do you structure Terraform for multiple environments? Modules, workspaces or separate directories, and variables.
- What happens if someone changes infrastructure manually? Drift detection, plan output, and policies to prevent it.
- Terraform versus configuration management tools such as Ansible. Provisioning versus configuring.
Cloud
- Design a highly available web application on a major cloud provider. Multiple availability zones, load balancers, autoscaling, managed databases with replicas, and backups.
- How do you control cloud costs? Right sizing, autoscaling, reserved or committed capacity, cleaning up unused resources, and tagging for visibility.
- Explain IAM roles and the principle of least privilege.
- How would you set up networking for a new environment? VPCs, public and private subnets, NAT, and security groups.
Observability and SRE concepts
- What is the difference between metrics, logs, and traces?
- What are SLIs, SLOs, and error budgets? Example: an SLI is the share of requests faster than 300 milliseconds, the SLO is 99.9 percent of requests meeting that over 30 days, and the error budget is the remaining 0.1 percent.
- How do you design alerts that are not noisy? Alert on symptoms users feel, not every cause. Use SLO based alerts and make every page actionable.
- What should a runbook contain?
- How do you run a blameless postmortem?
Incident and behavioral questions
- Tell me about the worst incident you handled.
- Tell me about a time you automated something that saved the team time.
- How do you handle on-call fatigue on a team?
- Tell me about a time you pushed back on a risky release.
Use the STAR method. For incident stories, be precise about your role, the timeline, and what changed afterward.
Scripting rounds
Expect short practical tasks in Bash or Python:
- Parse a log file and count errors per hour.
- Find the top ten IP addresses by request count.
- Check a list of URLs and report the ones that fail.
- Rotate or archive files older than a number of days.
Write readable code, handle errors, and mention how you would run it on a schedule.
A one-week review plan
| Day | Focus |
|---|---|
| 1 | Linux troubleshooting scenarios |
| 2 | Networking, DNS, TLS, and load balancing |
| 3 | Docker and Kubernetes scenarios |
| 4 | CI/CD and Terraform |
| 5 | Cloud architecture and cost |
| 6 | Observability, SLOs, and incident stories |
| 7 | Scripting practice and review |
FAQ
What is the most important skill in a DevOps interview?
Structured troubleshooting. Tools change, but a calm, step by step approach to finding a problem is what interviewers want to see.
Do I need Kubernetes experience for DevOps jobs?
Many postings ask for it. If you have not used it at work, build a small cluster, deploy an app with a database, break it on purpose, and fix it. You will then have real stories to tell.
How do I answer if I have never used a tool they ask about?
Say so, connect it to a similar tool you know, and explain how you would learn it. Honest answers are better than guesses.
Find DevOps roles and prepare for them
Browse DevOps and SRE jobs, cybersecurity jobs, and system engineering jobs on Interviews. When an interview is booked, the prep plan builds quizzes and topics for that company's stack. Create a free profile to start.