DevOps interviews test whether you can help a team ship changes quickly without breaking things, and recover calmly when something does break. Tool knowledge matters, but interviewers usually care more about why you set something up a certain way and what you would do when it fails.
This guide covers CI/CD pipeline design, containers and Kubernetes, infrastructure as code, deployment strategies, alerting, SLOs and error budgets, incident response, secrets, cloud costs and Linux troubleshooting. For general coding and system design questions, see the software engineer guide. The sample answers use [placeholders] for your own environments and results, so replace them with things you have actually run.
If you’re moving into DevOps from development or system administration, lean on that background. Developers know the pain of slow pipelines and flaky environments; administrators know Linux, networking and what production looks like at 3 a.m. Both are strong foundations.
How the interview usually goes
- Recruiter screen: your experience, the cloud platforms and tools you’ve used, the kind of systems you’ve supported, on-call experience, notice period and salary expectations.
- Technical deep dive: Linux, networking, containers, Kubernetes and CI/CD, often following on from what’s on your CV.
- Hands-on task at many companies: writing a pipeline or a Dockerfile, fixing a broken configuration, or working through a live troubleshooting scenario, sometimes as a take-home.
- Design round, mostly for mid-level and senior roles: for example, a deployment platform, a monitoring setup or the infrastructure layout for several environments.
- Behavioural round: incidents, failed releases, on-call pressure and working with development teams.
CI/CD, containers and Kubernetes
Explain each concept by the problem it solves before you go into commands or configuration. Interviewers often ask “why” two or three times in a row to see where your understanding stops.
How would you design a CI/CD pipeline for a new service?
What they’re checking: This shows how you balance speed, safety and repeatability. Interviewers look for building once and promoting the same thing, fast feedback, and a clear way back when a release goes wrong.
- Build the container image once, tag it with the commit, and promote that same image through every environment.
- Order the stages for fast feedback: cheap checks first, slower tests later, in parallel where possible.
- Keep the pipeline definition in the repository, and give the pipeline short-lived credentials rather than stored keys.
Sample answerI’d keep the pipeline definition in the repository, so it’s versioned and reviewed like code. Every pull request runs linting, unit tests and a build, with caching so feedback arrives in minutes, plus dependency and image scanning. On merge to the main branch, the pipeline builds a container image once, tags it with the commit hash and pushes it to a registry. That exact image goes to staging, where integration and smoke tests run, and is then promoted to production without being rebuilt, so what we tested is what we ship. Production releases use a progressive strategy such as a canary, with automatic rollback if error rates or latency get worse. The pipeline reaches the cloud with short-lived credentials rather than long-lived keys. And rolling back should be a single, practised step, because the pipeline’s job is to make change safe, not just fast.
What’s the difference between a container and a virtual machine?
What they’re checking: A fundamentals check. Interviewers want to hear about isolation and the shared kernel, not just that containers are lighter.
- A VM virtualises hardware and runs its own operating system kernel; containers share the host’s kernel.
- Name the Linux features behind containers: namespaces for isolation and cgroups for resource limits.
- Explain when you would still choose a VM: stronger isolation for untrusted workloads, or a different operating system.
Sample answerA virtual machine runs on a hypervisor that virtualises the hardware, so each VM has a complete operating system with its own kernel. That gives strong isolation, but VMs are heavier and slower to start. A container is a set of ordinary processes on the host, isolated by the kernel using namespaces, so they get their own view of processes, the network and the file system, while cgroups limit their CPU and memory. Containers share the host’s kernel, so they start quickly and use far fewer resources, and the image packages the application with its dependencies, which keeps environments consistent from a laptop to production. The trade-off is a weaker isolation boundary: a kernel vulnerability can affect every container on the host. That’s why untrusted, multi-tenant workloads often run in VMs or lightweight sandboxed VMs, and in the cloud most containers run inside VMs anyway.
Explain pods, deployments and services in Kubernetes as if to a new teammate.
What they’re checking: Explaining Kubernetes plainly shows you understand it rather than copying YAML. Interviewers also check that you know why each object exists.
- Explain each object by the problem it solves: running containers, keeping the right number running, and giving them a stable address.
- Mention labels and selectors, which are how a service finds its pods.
- Know the probes: a readiness probe controls whether a pod receives traffic, and a liveness probe restarts a container that is stuck.
Sample answerA pod is the smallest thing Kubernetes runs: one or more containers scheduled together that share an IP address and can share storage. Pods are disposable. If a node dies, its pods go with it, and their replacements get new IP addresses, so we rarely create pods directly. A deployment describes the desired state, such as “run three replicas of this image”, and Kubernetes keeps it that way, replacing failed pods and rolling out a new version gradually when the image changes. Because pod addresses keep changing, a service gives a group of pods a stable name and virtual IP and spreads traffic across them, finding the pods by their labels. For traffic from outside the cluster, there’s a load-balancer service or HTTP routing through Ingress or the newer Gateway API. And readiness probes make sure a pod only receives traffic once it’s actually ready.
A pod is stuck in CrashLoopBackOff. How do you debug it?
What they’re checking: A common hands-on scenario. Interviewers want a calm, ordered approach using the right commands, not guesswork.
- Start with
kubectl describe podto see recent events, the last state and the exit code. A last state of OOMKilled means the container went over its memory limit. - Read the logs of the container that crashed, not its replacement, using
kubectl logswith the--previousflag. - Check the usual causes: missing configuration or environment variables, a wrong image tag or start command, a liveness probe that is too aggressive, or resource limits set too low.
Infrastructure, releases and security
What is infrastructure as code, and what good practices do you follow?
What they’re checking: IaC is central to repeatable environments. Interviewers look for review, state handling and drift control, not just knowledge of one tool’s syntax.
- Explain the benefits: reviewed changes, repeatable environments, and a history of who changed what and why.
- Mention remote state with locking, reusable modules, and a preview of changes before anything is applied.
- Have a view on drift: manual changes in the console should be rare, detected and brought back into code.
Sample answerInfrastructure as code means describing networks, servers, databases and permissions in version-controlled files, usually declaratively, and letting a tool create or update the real infrastructure to match. The main benefits are that changes are reviewed in pull requests, environments can be recreated reliably, and every change has a history. In practice, I keep state remote with locking, so two people can’t apply changes at once, and the pipeline shows a preview of the planned changes so reviewers see exactly what will happen before anything is applied. Common patterns go into reusable modules, and environments share the same code with different variables, so staging genuinely resembles production. I avoid manual changes in the cloud console; if one is needed in an emergency, it’s brought back into code afterwards, and scheduled drift checks catch anything missed. Credentials never go into the code.
Blue-green, canary or rolling: how do you choose a deployment strategy?
What they’re checking: Each strategy trades cost, speed and risk differently. Interviewers want to see you match the strategy to the service and know what each one needs to work.
- Rolling updates are the default for Kubernetes deployments; blue-green needs double capacity during the switch; canary needs good metrics and traffic splitting.
- With rolling and canary releases, old and new versions run side by side, so they must be compatible with each other and with the database schema.
- Mention feature flags, which separate deploying code from releasing a feature to users.
Sample answerA rolling update replaces instances a few at a time, needs little extra capacity and is the Kubernetes default. The catch is that old and new versions serve traffic together for a while, and rolling back is another rollout. Blue-green runs two full environments: I deploy to the idle one, test it, then switch all traffic at once, and rolling back is just switching back. It’s fast and clean, but needs double capacity during the release, and database changes must work with both versions. A canary sends a small share of traffic to the new version, compares its error rate and latency with the current one, and increases the share gradually, ideally with automatic promotion or rollback. It limits the damage of a bad release most, but needs good metrics and traffic control. For a busy customer-facing service I’d choose canary; for [a smaller internal service], rolling is usually enough.
How do you manage secrets in pipelines and applications?
What they’re checking: Leaked credentials cause serious security incidents. They want layered, practical controls rather than “we use environment variables”.
- Keep secrets out of code, images and logs; store them in a dedicated secrets manager and provide them at runtime.
- Prefer short-lived credentials, such as identity federation from CI to the cloud, over long-lived keys.
- Know that Kubernetes Secrets are only base64-encoded by default: enable encryption at rest and restrict who can read them.
Sample answerSecrets never go into the repository, container images or logs. They live in a dedicated secrets manager, and applications fetch them at runtime or have them injected, with access granted per service on a least-privilege basis and every read audited. Wherever possible, I avoid long-lived secrets altogether: the CI pipeline gets temporary cloud credentials through identity federation, and workloads use their platform identity instead of stored keys. In Kubernetes, Secrets are only base64-encoded by default, so I enable encryption at rest, restrict access with RBAC, or sync them from the external secrets manager. Rotation should be routine and automated, so it isn’t frightening when we need it urgently, and scanning commits for credentials catches mistakes early. If a secret does leak, the first step is to revoke and rotate it, and only then clean up the history, because once it’s been pushed you have to assume it’s been copied.
How do you keep cloud costs under control?
What they’re checking: Cost is an engineering concern too. Interviewers want to see that you make spending visible and treat it as a trade-off, not an afterthought.
- Make spending visible: tag or label resources by team and service, so each team sees what it spends.
- Match instance types to real usage, use autoscaling, and switch off non-production environments outside working hours.
- Use commitment discounts for steady baseline load, and interruptible capacity for work that can be restarted, such as batch jobs or CI runners.
- Clean up regularly: unattached volumes, old snapshots, idle load balancers, and data transfer between regions or zones that nobody planned for.
Monitoring, incidents and troubleshooting
Reliability questions reward precise definitions and a calm, ordered process. Define terms correctly, then show how they change what you do on a bad day.
How do you decide what to alert on?
What they’re checking: Noisy alerts burn people out and end up ignored. Interviewers want to see alerts tied to user impact that are always actionable.
- Page on symptoms users feel, such as errors, latency or unavailability, rather than causes such as high CPU.
- Every page should be urgent and actionable; anything that can wait belongs in a ticket or on a dashboard.
- Link each alert to a runbook, and review noisy alerts regularly.
Sample answerI start from what users experience. The alerts that wake someone up should be about symptoms: requests failing, latency too high, or a key journey such as checkout not working. Causes like high CPU or a growing queue go on dashboards or lower-priority alerts, because high CPU with happy users isn’t an emergency, and plenty of real outages never show up as high CPU. Every paging alert must be urgent and actionable; if the right response is “look at it tomorrow”, it should open a ticket instead. Each alert links to a runbook with first steps. Where we have SLOs, I prefer burn-rate alerts, which fire when the error budget is being used up fast enough to run out soon, rather than on every brief spike. And after each on-call rotation, we review which alerts fired and tune or delete the ones nobody acted on.
What are SLIs, SLOs and error budgets?
What they’re checking: These ideas turn reliability into a shared, measurable target. Interviewers check that you define them correctly and can explain how they guide decisions.
- An SLI is a measurement, an SLO is a target for it over a period, and an SLA is a contract with consequences, usually looser than the internal SLO.
- Know the arithmetic: 99.9% over 30 days allows about 43 minutes of complete downtime, or the same budget spread across partial failures.
- Explain why 100% is the wrong target: each extra nine costs much more, and beyond a point users can’t tell the difference.
Sample answerA service level indicator is a measurement of what users experience, usually a ratio, such as the share of requests that succeed or that complete within [a latency threshold]. A service level objective is a target for that indicator over a window, for example 99.9% of requests succeeding over 30 days. The error budget is what’s left: the 0.1% of requests that are allowed to fail. The useful part is how the budget guides decisions. While there’s budget left, the team can ship quickly and take reasonable risks. If it’s being used up too fast, the team has agreed in advance to slow down risky releases and put effort into reliability until it recovers. That turns arguments between features and stability into a decision based on data. An SLA is different: it’s a contract with customers, with penalties, so it’s usually set looser than the internal SLO.
Walk me through how you handle an incident.
What they’re checking: Incidents test structure under pressure. Interviewers listen for mitigation before root cause, clear roles and communication, and a genuinely blameless review afterwards.
- Separate the roles: someone coordinates, others investigate, and someone keeps stakeholders updated.
- Mitigate first, by rolling back, failing over or switching off a feature, and find the root cause afterwards.
- Explain blameless correctly: it means examining the systems and conditions that allowed a mistake, not that nobody owns the follow-up actions.
Sample answerWhen an alert or report comes in, the first step is to confirm the impact and declare an incident, so everyone knows it’s being handled. On a larger incident we split roles: an incident lead who coordinates and makes decisions, people investigating, and someone updating stakeholders on a regular schedule. The priority is stopping the impact, not finding the root cause, so we look at rolling back a recent change, failing over, scaling up or switching off a feature flag. We keep a timeline in the incident channel as we go. Afterwards, we write a blameless post-mortem covering impact, timeline, contributing factors, what went well, and actions with owners and dates. Blameless means asking why the system made the mistake easy and why our safeguards didn’t catch it, rather than who to blame, so people are honest about what happened. Then the actions are tracked like any other work.
A Linux server, or a service running on it, is slow. How do you troubleshoot it?
What they’re checking: Interviewers want a systematic approach that checks each resource in turn, not a random sequence of commands.
- Work resource by resource, CPU, memory, disk and network, checking utilisation, saturation and errors for each.
- Know what load average means on Linux: it counts processes waiting on disk I/O as well as those running or waiting for CPU.
- Have a few classic findings ready, such as the out-of-memory killer ending a process, or a disk filled by a deleted log file that a process still holds open.
Sample answerI start with the symptom and what changed recently: a deploy, a configuration change, more traffic. Then I go through the resources one at a time. For CPU, uptime and top show the load and which processes are busy; on Linux, load average also counts processes waiting on disk, so high load with idle CPU points to I/O. For memory, free and the kernel log show whether we’re swapping or the out-of-memory killer has stepped in. For disk, df -h shows space, df -i shows inodes and iostat shows whether the disk is saturated. If df says the disk is full but the files don’t add up, a deleted file may still be held open, which lsof can find. For network, ss shows connections and listening ports. Throughout, the service’s own logs, often through journalctl, frequently say exactly what’s wrong, so I check them early.
Behavioural questions
Expect stories about pressure, mistakes and working with other teams. Structure them with the STAR method, and be clear about your own part.
Tell me about a deployment that failed and how you rolled it back.
What they’re checking: Anyone who deploys regularly has seen a release go wrong. They want quick detection, a calm rollback decision, and improvements to the process afterwards.
- Explain why you rolled back rather than fixing forward; restoring service usually comes first.
- Mention any complications, such as a database migration that made rolling back harder.
- Finish with what changed in the pipeline or release process because of it.
Sample answerAt [Company], we deployed [the change — for example, a new version of the payments API], and within [time] our alerts showed [the symptom — for example, a rise in server errors]. I was [your role]. We decided to roll back rather than fix forward, because the cause wasn’t obvious and users were affected. The rollback was [easy or complicated — for example, complicated by a migration that had already dropped a column the old version needed], so we [what you did — for example, restored the column and redeployed the previous image]. Service recovered after [time]. In the post-mortem we found [the root cause], and I [the improvements you made — for example, moved us to expand-and-contract migrations and added a canary stage with automatic rollback on error rate]. Since then, [the result — for example, rollbacks have been routine rather than stressful].
How do you get development teams to adopt a new practice or platform?
What they’re checking: DevOps is as much about collaboration as tooling. Interviewers want to see that you enable teams rather than act as a gatekeeper.
- Make the right way the easy way: templates, self-service and good defaults rather than mandates.
- Start with one willing team, fix the friction they find, and let their results persuade the others.
- Measure outcomes developers care about, such as lead time for changes, deployment frequency, change failure rate and time to recover.
Tell me about something you automated that saved your team real time or effort.
What they’re checking: Automation is at the heart of the role. They want to see that you pick problems worth solving and build something others can rely on.
- Pick something with a clear before and after: a manual release process, environment setup, certificate renewal or access requests.
- Explain how you decided it was worth automating, and how you made it reliable and understandable for other people.
- Share the result honestly with your own figures, such as hours saved each week or fewer failed releases.
Questions to ask the interviewer
- How do changes get to production today, and what would you most like to improve about that process?
- What does on-call look like: how big is the rotation, how often are people paged, and how are alerts reviewed?
- Do you have SLOs for your main services, and how are they used in planning?
- How is the team’s time split between building new platform features and supporting other teams?
- How are post-mortems run here, and what is something that changed because of one?
- What would you expect someone in this role to have improved after six months?
Common mistakes
- Listing tools instead of explaining choices; say why you used something and what you would do if it failed.
- Suggesting alerts on every metric; explain that pages should be for user-facing symptoms and always actionable.
- Mixing up SLIs, SLOs and SLAs, or calling 100% a sensible target; define each correctly and explain the error budget.
- Jumping to root cause in an incident question; say you would mitigate first, then investigate.
- Telling a failure story that blames a person; focus on the gaps in the system and what you changed.
- Claiming experience with tools you’ve only read about; say honestly how far your experience goes and how you would learn the rest.
The day before
- Draw your current or most recent pipeline from commit to production, and be ready to explain each stage and how a rollback works.
- Practise explaining pods, deployments, services and probes out loud, without notes.
- Revise the core Linux commands for CPU, memory, disk and network problems, and what their output tells you.
- Prepare three stories: an incident, a failed deployment and something you automated, each with your role and what changed afterwards.
- Work out the error budget for 99.9% and 99.99% over 30 days, so the arithmetic comes easily if you’re asked.
- Test your camera, microphone, internet connection and any terminal or editor link you’ve been sent.
Lucimeet’s AI interviewer asks you the questions, listens to your answers, asks follow-ups and scores each one — then shows a better way to say it. Your first interview is free.