DevOps interview questions: what happens after you press deploy

The junior version of a DevOps round is a vocabulary test: CI, CD, containers, Kubernetes. The senior version starts where the vocabulary runs out, at the moment a deploy goes wrong and somebody has to decide what happens in the next five minutes.

PracticeDepth team10 min read

Most interview topics let you be right in the abstract. DevOps mostly doesn't, because every answer has a production system behind it, and production is where a plausible answer and a working one come apart. Interviewers know this, so the questions are built around failure. The pipeline you describe is fine. What they want to know is what it does on the day it's wrong, and how you'd find out.

The questions below come up again and again in senior screens, and they share one spine: for any mechanism you name, what does it depend on, and what happens when that dependency isn't there? If you'd rather work through the topic than read about it, the DevOps track covers the same ground one idea at a time.

Question 1: the deploy doubled the error rate. Roll it back.

This is the question that sorts candidates fastest, because the obvious answer is correct about half of the system and says nothing about the other half.

You shipped a release and errors doubled. How do you roll back?

Junior answer

Redeploy the previous image tag, or revert the commit and let the pipeline ship it. That gets us back to the last known good version.

Senior answer

Redeploying the old image is the easy half, and it only works if the new version didn't change anything the old version can't cope with. So the first thing I'd ask is whether this release carried a migration. If it did, the old code is about to start against a schema it has never seen, and if the new code has already written rows in a new shape, the old code has to read those too. That's why I'd want every release to be backward compatible with the one before it, schema included. If that rule held, rollback is one click. If it didn't, rolling back can be the more dangerous move, and fixing forward is the safer option.

The follow-up is almost always the same: what if the migration dropped a column? An answer that only covers images has nothing left to say at that point.

The pattern that makes rollback safe has a name, expand and contract, and it's worth being able to sketch. You never change a schema in the same release that depends on the change. You widen it first, move the code across in steps, and narrow it only once nothing deployed still reads the old shape.

-- Release 1 (expand): add the new column. Old code ignores it.
ALTER TABLE users ADD COLUMN display_name text;

-- Release 2: code writes both columns and reads the new one.
-- Backfill in batches, never in one giant transaction.
UPDATE users SET display_name = full_name
WHERE display_name IS NULL AND id BETWEEN 1 AND 10000;

-- Release 3: code stops touching full_name entirely.

-- Release 4 (contract): drop it, once nothing deployed reads it.
ALTER TABLE users DROP COLUMN full_name;
A rename in one release can't be rolled back. Split over four, every release has a schema it can still read.

Say the cost out loud, because the interviewer is waiting to see if you know it. Four releases for a rename is slow, and for a table nobody else touches it can be overkill. The point is knowing which changes need it: anything that removes or renames something the running code reads. Adding a nullable column never does. The migration side of this goes deeper in the database round, and it's a common place for a DevOps interview to wander into.

Question 2: what does your health check actually check?

Health checks look like monitoring, so candidates treat them as a nice-to-have. They aren't. The load balancer or the orchestrator reads the check before it decides whether to send you traffic, which makes it an availability dependency. If the check is wrong, the app can be perfectly healthy and the site still goes down.

What should a health check endpoint do?

Junior answer

Return 200 if the service is up. Ideally it also checks the database and the cache, so it only reports healthy when everything is working.

Senior answer

It depends on who's reading it, because there are really two questions. Liveness asks whether this process is stuck and should be restarted. Readiness asks whether it should get traffic right now. I'd keep liveness nearly trivial. If it checks the database, then a thirty-second database blip fails the liveness check on every replica at once, the orchestrator restarts all of them together, and a small outage becomes a full one with a cold start on top. Readiness can look at dependencies, carefully, because failing it only takes the instance out of rotation. And whichever one it is, I'd test it inside the real container, since a check pointing at the wrong port fails forever while the app happily serves requests underneath it.

Expect a follow-up about what happens when every instance fails readiness at the same time. The honest answer is that you've turned a partial outage into a total one, and some load balancers fail open in exactly that case for that reason.

That last detail is worth having in your pocket as a general rule rather than a war story. Anything that can gate traffic has to be exercised in the environment it will run in. A green test suite checks your application. It says nothing about the container, the port the platform injects, or the probe config, and those are exactly the things that take a site down while every dashboard in CI stays green.

Question 3: blue-green or canary?

Everyone can define these. The senior answer is about what each one needs before it's worth anything.

Would you use blue-green or canary deployments for this service?

Junior answer

Canary is safer. You send a small percentage of traffic to the new version first, and if it looks fine you roll it out to everyone.

Senior answer

Canary is only safer if I can tell whether the canary is healthy, and that's a statistics question before it's a deployment one. At one percent of a service doing ten requests a second, the canary sees six requests a minute. I'm not going to spot a doubled error rate in that for a long time, so either the canary takes a bigger slice or it runs longer, and I'd want the comparison automated against the baseline rather than someone eyeballing a graph. Blue-green gives me an instant, complete switch and an instant switch back, but it moves every user at once and needs double the capacity during the cutover. Both have the same catch: the two versions share one database, so the schema rules from rollback apply here as well.

The follow-up is what metric decides that the canary passed. Error rate and latency on the paths users actually hit is a good start. CPU is not.

Feature flags come up around here too, and it's worth being precise about what they buy. A deploy puts code on servers. A flag decides who runs it. Separating the two means turning a feature off doesn't need a release, and that's usually the fastest rollback you have. The cost is that every flag is a branch nobody tests in both directions for long, so a senior answer mentions cleaning them up.

Question 4: what would you page someone for?

The question is about alerting, and the interviewer is listening for whether you've ever been woken up by a bad alert.

  • Page on symptoms, not causes. Users feel errors and slowness. They don't feel 90% CPU. A box running hot while every request succeeds is a ticket for the morning, not a phone call at 3am.
  • Every page needs an action. If the right response to an alert is to look at it and go back to sleep, it isn't an alert, it's noise, and noise trains people to ignore the next page, including the real one.
  • Alert on a ratio over a window. Five failed requests means nothing without knowing whether that was five out of ten or five out of a million, and a single bad minute usually isn't worth waking anyone.
  • Mind your cardinality. Putting a user id or a full URL on a metric label creates a new time series per value, and the monitoring bill or the metrics store is what finds out first.

Frameworks help here if you use them to reason rather than to recite. RED (rate, errors, duration) fits request-driven services. USE (utilisation, saturation, errors) fits resources like disks and queues. Naming one is fine. Showing which signal from it you'd actually page on, for the service they described, is what earns the point.

Question 5: tell me about an incident

This one sounds behavioural, and it's graded on engineering. The interviewer wants to hear the order you did things in, because the order is where most incidents go wrong.

Walk me through a production incident you handled.

Junior answer

The API started timing out, so I dug through the logs, found a slow query that had shipped that day, fixed it, and deployed the fix. It was back to normal in about two hours.

Senior answer

The first thing I'd tell you is how we found out, because in that one a customer told us, and that was the biggest finding of the whole postmortem. Then mitigation before diagnosis: we rolled back within ten minutes, before anyone understood the cause, because stopping the bleeding doesn't need a root cause. The diagnosis came after, with the pressure off. The postmortem was blameless, and it produced two actions. One was an alert on the latency that would have caught it before the customer did. The other was a query review step in the pipeline. Neither of them was 'be more careful', because that action is always on the list and never changes anything.

The follow-up is usually why you rolled back without knowing the cause. A good answer is that you'd rather have a boring hour of investigation than an exciting one with users watching.

Notice the senior answer is shorter on the technical fix and longer on detection and process. That's deliberate, and it's the same move covered in how to talk about trade-offs: the interviewer can guess how you fixed a slow query. They can't guess how you run an incident unless you tell them.

Question 6: someone fixed it by hand in the console

Infrastructure as code gets asked about in terms of tools, and answered better in terms of what it guarantees. It guarantees nothing if people change things by hand.

Say what you'd actually do. A manual fix during an incident is often the right call, and nobody wants a lecture about process while the site is down. The failure is leaving it there. Now the code describes a system that doesn't exist, and the next apply either quietly reverts the fix or fails in a way nobody understands. So the rule is that a console change during an incident becomes a pull request the same day, and ideally the production console is read-only the rest of the time. Drift detection on a schedule catches whatever slips through. Mentioning that your tool keeps state, and that the state file itself needs locking and backing up, is a detail that tells the interviewer you've run it on a team.

Common questions

Do I need Kubernetes experience for a DevOps interview?

It helps, but knowing the model matters more than knowing the YAML. Be able to say what an orchestrator does for you (scheduling, restarts, rolling updates, service discovery) and what it costs, which is a lot of moving parts for a small team. And don't name it on your CV unless you can follow it two questions deep, because every tool you name is a claim.

Trunk-based development or long-lived feature branches?

Short-lived branches merged to main at least daily, with flags hiding unfinished work, is the answer most teams that deploy often have landed on. The reason is integration pain. A branch that lives for three weeks gets merged in one painful afternoon. What lands in an interview is saying what trunk-based needs to be safe: a fast pipeline, good tests, and flags.

How much cloud-specific detail do they expect?

Less than you'd think. Concepts travel: a private subnet, a load balancer in front of instances in more than one zone, least-privilege roles, a managed database with backups you've actually restored. Naming the specific services from one provider is fine. Knowing why each piece is there is what's being scored, and it's the same reasoning a system design round looks for.

I've never been on call. How do I answer incident questions?

Say so, then reason about it anyway. Use the worst production bug you've seen, even a small one, and walk through it in the order above: how it was detected, what stopped the damage, what caused it, what changed afterwards. Interviewers care much more about whether you'd mitigate before diagnosing than about whether it happened at 3am.

DevOpsReliabilityTopic guide

Keep reading

All posts