VHow do you roll back a bad production deploy?
Interviewer questionDevOps
DevOps is a way of working more than a single tool, so good answers connect tools to goals: faster and safer releases, repeatable environments and quick recovery. Interviewers like candidates who can name a tool and also say why the team chose it.
For spoken answers, describe a real flow from beginning to end: code is pushed, the pipeline runs, the service is deployed, and monitoring tells you whether it works. Add what happens when something fails, because that is where the interview usually goes next.
- ✓Words → phrases → sentences → speaking
- ✓Answer meaning
- ✓Language
Common questions and sample answers
How would you design a CI/CD pipeline for a backend service?
What the interviewer wants to hear. Stages in order, fast feedback, one build artifact promoted between environments, and a safe release with a rollback.
Sample answer to practise aloudContinuous integration means that every change is built and tested automatically. Continuous delivery means that the result is always ready to release. My pipeline starts on every pull request: build, unit tests, static analysis and a scan of the dependencies. After the merge, it builds a container image once and pushes it to a registry. The same image goes to staging, where integration tests run, and then to production. For production, I prefer a gradual release, such as a canary or a rolling update, with an automatic check of the error rate. If something is wrong, we roll back to the previous image. I keep the pipeline fast, so developers do not avoid it.
How is a container different from a virtual machine?
What the interviewer wants to hear. Shared kernel versus separate guest operating system, image versus container, isolation level and typical use cases.
Sample answer to practise aloudA virtual machine runs a full guest operating system on top of a hypervisor, so it is heavier and slower to start. A container is an isolated process on the host. It shares the host kernel, and Linux features such as namespaces and cgroups provide the isolation and the resource limits. That is why containers start quickly and use less memory. An image is a read-only package with the application and its dependencies, and a container is a running instance of an image. The result is that the application behaves the same on my laptop, in the pipeline and in production. The trade-off is weaker isolation than a virtual machine.
What is infrastructure as code, and why is it useful?
What the interviewer wants to hear. Declarative definitions in version control, a plan before apply, state handling and drift, with a tool named from real experience.
Sample answer to practise aloudInfrastructure as code means that I describe servers, networks and databases in files instead of clicking in a console. I use a tool like Terraform. The files are stored in Git, so every change is reviewed, has a history and can be repeated in another environment. Terraform shows a plan before it applies changes, so the team sees what will be created or destroyed. It keeps a state file, which I store remotely with locking, so two people cannot change it at once. The main risks are configuration drift, when someone changes things by hand, and secrets in code. I keep secrets in a secret manager, not in the repository.
What do you monitor in a production service, and how do you decide what to alert on?
What the interviewer wants to hear. Metrics, logs and traces; the four golden signals; alerts on symptoms that users feel, not on every possible cause.
Sample answer to practise aloudI use three kinds of data: metrics, logs and traces. For every service, I start with four basic signals: latency, traffic, errors and saturation, for example CPU, memory or queue length. I show them on a dashboard in a tool like Prometheus and Grafana. For alerts, I focus on symptoms that users feel, such as a high error rate or slow responses, and not on every internal detail. Each alert must be actionable and have a runbook. Too many alerts create alert fatigue, and then people ignore the important ones. I also define service level objectives, so the team knows what good means.
How do you handle a production incident?
What the interviewer wants to hear. Mitigate first, communicate clearly, find the cause afterwards, and learn from a blameless postmortem.
Sample answer to practise aloudFirst I confirm the impact and tell people that we are working on it. Then I try to reduce the damage quickly. Often the fastest action is to roll back the last change or to turn off a feature flag, and only after that do I look for the root cause. I keep clear roles: one person leads, others investigate, and one person updates the stakeholders regularly. During the incident, I write down the timeline. After it is solved, we hold a blameless postmortem. We look at what in the system or the process allowed the failure, and we agree on concrete actions, such as a new alert or a test.
How to say the key terms
- Kubernetes
- koo-ber-NET-eez
- Docker
- DOK-er
- Terraform
- TERR-uh-form
- YAML
- YAM-ul
- canary
- kuh-NAIR-ee
- Prometheus
- pruh-MEE-thee-us
- nginx
- engine-X
Useful phrases for answering
- Every change goes through the pipeline.
- We roll back first and investigate later.
- It is all defined as code in Git.
- The alert is based on what users feel.
- The same image runs in every environment.
- We keep the blast radius small.
- I would automate that step.
- The postmortem is blameless.
Common mistakes to avoid
- Listing tools without a story. "I know Jenkins, Docker, Kubernetes and Terraform" says little. Say what problem each tool solved for your team and what went wrong once.
- Treating DevOps as a job title for the person who deploys. Say that it is about shared responsibility between development and operations.
- Describing a release without rollback and monitoring. A pipeline with no way back and no way to see errors is only half of the answer.
- Mixing up "deploy" and "release". Deploy puts a version on servers; release makes it available to users. They can happen at different times, for example behind a feature flag.
- Saying "infrastructures" or "softwares". In this meaning both words are uncountable, so use "infrastructure" and "software", or "pieces of software".
Frequently asked questions
Which tools do I need to know for a DevOps interview?
Know one tool well in each area: a CI system such as GitHub Actions or Jenkins, Docker, one cloud provider, an infrastructure as code tool and a monitoring stack. Interviewers care more about how you used them than about the length of the list.
Do I need to write code in a DevOps interview?
Often a little: a shell script, a small Python task or a pipeline file. Say what you are doing while you write it, and mention error handling and logging, because automation that fails silently is dangerous.
How do I talk about an incident that I caused?
Tell it honestly and briefly: what happened, how you reduced the impact and what changed afterwards. A blameless story with a lesson shows maturity, and hiding the mistake does not.
Reading an answer is not the same as saying it. Practise each question out loud, then compare the meaning and the language of your own answer.
Try SpeakRole ↗Other topics in this area