Practice Exercises for DevOps and SRE Interviews
The best practice for DevOps and SRE interviews combines four kinds of exercise: written troubleshooting drills, practical coding exercises, failures you cause on purpose on your own machine, and broken servers on outside practice sites. Each trains a different part of the interview. Reading question lists trains none of them, because interviews ask you to investigate, write code, and explain decisions under follow-up questions.
The sections below describe each kind of exercise, what it trains, and a weekly routine.
1. Written Troubleshooting Drills
Many troubleshooting rounds are spoken: you say what you would check, and the interviewer tells you the result. A written drill practices exactly that. You read a symptom, choose the next check, read the output you are given, and explain what it shows and what it rules out.
Six drills are worth practicing: a website that is down, errors after a deployment, high CPU on one server, a slow server that is not busy, a failing SSH connection, and HTTP 500 errors at peak traffic. In each one, practice the same method: confirm the problem, scope it, reduce the harm first, then test one hypothesis at a time and say why.
2. Practical Coding Exercises
Coding rounds in these loops are usually practical. Write each of these in Python from a blank file, in under 30 minutes, with a few test inputs of your own:
- Count status codes and the top three paths in a web server access log, skipping malformed lines.
- Build a grep style tool that supports a pattern, case-insensitive search, line numbers, counts, and inverted matches.
- Print the last N lines of a very large file by reading blocks from the end, not the whole file.
- Count how many requests a rate limiter drops under a fixed window and under a sliding window.
Then add a follow-up change to each, such as a new field order, and notice how much of your code had to change.
3. Failures You Cause on Your Own Machine
Set up a Linux virtual machine, Docker, and kind (a tool that runs a small Kubernetes cluster inside containers). Then break things on purpose and investigate them with the commands an interviewer expects:
| Failure to cause | Commands to practice |
|---|---|
| Fill a disk with a large file, then delete it while a process holds it open | df, du, lsof +L1 |
| Stop a service, or bind it only to localhost | systemctl status, ss -tlnp, curl -v |
| Point the first DNS server at an address that does not answer | dig, curl -w, cat /etc/resolv.conf |
| Give a pod a memory limit below what it uses | kubectl describe pod, kubectl logs --previous |
| Reference a Secret key that does not exist | kubectl get pods, kubectl describe pod |
Causing the failure yourself teaches what the evidence looks like before you see it in an interview.
4. Outside Practice Sites
Some companies give candidates a real shell on a broken system. Sites such as SadServers and iximiuz Labs offer broken Linux and container environments prepared by someone else, so you cannot know the cause in advance. SadServers has a free tier. Work through them while explaining each command aloud.
5. Design and Story Practice
Practice two or three infrastructure designs out loud, such as a CI/CD platform for many teams or a metrics and alerting pipeline, with numbers for capacity and a plan for failure. Also write five short stories about incidents and projects you handled, each with a number and what changed afterward.
A Weekly Routine
| Day | Exercise |
|---|---|
| 1 | Two written troubleshooting drills, explained aloud |
| 2 | One coding exercise from a blank file, then its follow-up change |
| 3 | One failure caused on your own machine, investigated with commands |
| 4 | One outside practice site exercise |
| 5 | One design question or two incident stories, spoken and timed |
Grokking DevOps and SRE Interviews is built around this kind of practice: troubleshooting drills with command output at each step, runnable Python exercises that check their own results, infrastructure design questions, and two full written practice interviews.
Key Points
- Practice investigating, coding, and explaining, not memorizing question lists.
- Written drills train spoken troubleshooting, and your own machine trains the commands.
- Outside practice sites give broken systems you did not prepare yourself.
- Practice design answers and incident stories aloud, with numbers.

GET YOUR FREE
Coding Questions Catalog

$98

$98

$197