Skip to the content.

DevOps Interview Questions and Answers: SRE, Kubernetes, CI/CD, Terraform and Linux (2027 Edition)

DevOps interview questions with answers for DevOps engineer, Site Reliability Engineer (SRE), platform engineer and cloud engineer roles. It covers Linux and networking, containers and Docker, Kubernetes, CI/CD and deployment strategies, infrastructure as code with Terraform and OpenTofu, observability, SLOs and error budgets, incident response, security and supply chain, cloud architecture and the troubleshooting scenarios that decide most SRE interviews. Answers are short enough to say out loud and specific enough to show real experience.

Last reviewed: December 2026. Version-specific notes refer to the state of Kubernetes and tooling at that date; check the Kubernetes releases page for current versions. Nothing here is an official or leaked company question.

Table of Contents


How DevOps and SRE Interviews Are Structured

Patterns frequently reported in public interview experiences:

Round Length What happens
Recruiter screen 20-30 min Background, stack, on-call experience, expectations
Technical screen 45-60 min Rapid-fire Linux/networking/Kubernetes questions, or a scripting task
Troubleshooting / debugging 45-60 min “The site is slow / pod won’t start / disk is full, walk me through it” (sometimes on a live broken VM)
Coding 45-60 min Scripting (Python, Bash, Go) such as log parsing; at some companies a standard algorithms round, especially for SRE roles
System design 45-60 min Design a deployment pipeline, a monitoring system, or a highly available service
Behavioral 30-60 min Incidents, on-call, disagreements, automation wins

What is different by title:


Study Roadmap

Stage Time Focus Proof you’re ready
1. Linux and networking 2-3 weeks Processes, files, permissions, systemd, logs, TCP/IP, DNS, HTTP, TLS You can explain “what happens when you curl a URL” for 5 minutes
2. Containers 1 week Images, layers, namespaces, cgroups, Dockerfiles, registries You’ve written a small multi-stage Dockerfile and know why it’s small
3. Kubernetes 3-4 weeks Pods, Deployments, Services, Ingress/Gateway, config, probes, resources, RBAC, debugging You can debug CrashLoopBackOff and Pending pods without notes
4. CI/CD 1-2 weeks Pipelines, artifacts, environments, deployment strategies, GitOps A pipeline that tests, builds, scans and deploys a service
5. IaC 2 weeks Terraform/OpenTofu state, modules, plan/apply, drift You can explain state locking and how you’d import existing resources
6. Observability and SRE 2 weeks Metrics, logs, traces, SLOs, alerting, incident response You can define an SLO and a burn-rate alert for an API
7. Cloud 2-3 weeks VPCs, IAM, compute, storage, load balancing, managed databases You can draw a highly available 3-tier app on one cloud
8. Interview practice 1-2 weeks Mock troubleshooting, design, behavioral 3 mocks done, 6 incident/automation stories written

Total: about 3-4 months part-time from a developer or sysadmin background.


1. DevOps and SRE Concepts

Q1. What is DevOps?

A way of working that removes the wall between building software and running it. Teams own their services end to end, automate the path to production, get fast feedback from production, and improve continuously. It’s a culture and set of practices (CI/CD, IaC, monitoring, blameless learning), not a job title or a tool.

Q2. DevOps vs SRE vs platform engineering?

Q3. What are the DORA metrics?

DORA’s current guide lists five software delivery metrics (dora.dev):

Metric Type Meaning
Change lead time Throughput Commit to running in production
Deployment frequency Throughput How often you deploy
Failed deployment recovery time Throughput Time to recover from a deployment that needed urgent intervention
Change fail rate Instability Share of deployments that need a rollback or hotfix
Deployment rework rate Instability Share of deployments that are unplanned, caused by a production incident

Older material calls these the “four key metrics” with “MTTR” instead of failed deployment recovery time; mention that you know both. The point DORA’s research keeps making: speed and stability go together in high-performing teams; they are not a trade-off.

Q4. What did the 2025 DORA report say about AI?

The 2025 report, renamed State of AI-assisted Software Development, found AI use near universal among respondents and described AI as an amplifier: it magnifies a team’s existing strengths and weaknesses. AI adoption was linked to higher throughput but still to lower delivery stability, which is why strong testing, small batches and good platforms matter more, not less, with AI coding tools.

Q5. What is toil?

Manual, repetitive, automatable work that scales with service size and has no lasting value: restarting a stuck job by hand, copying configs, manual certificate renewals. Google’s SRE book suggests keeping it under 50% of an SRE’s time (Eliminating Toil).

Q6. Explain “cattle, not pets.”

Servers should be interchangeable and replaceable (cattle), built from code and images, not hand-tuned machines you nurse back to health (pets). If something is broken, replace it. This is what makes autoscaling and immutable deployments possible.

Q7. What is the Twelve-Factor App?

A set of principles for cloud-native apps: config in environment variables, stateless processes, backing services as attached resources, logs as event streams, dev/prod parity, and so on (12factor.net). Still a good checklist for “is this service easy to run in containers?”

Q8. What’s immutable infrastructure?

You never modify a running server or container. You build a new image with the change and replace the old one. Benefits: no configuration drift, easy rollback (deploy the previous image), reproducible environments.


2. Linux

Q9. What happens when you run a command in the shell?

The shell parses the line, expands variables and globs, finds the executable in $PATH, calls fork() to create a child process, the child calls execve() to replace itself with the program, and the parent wait()s for it to finish (unless backgrounded). The exit status goes into $?.

Q10. Process vs thread?

A process has its own address space, file descriptors and resources. Threads are scheduled units inside one process that share its memory. Threads are cheaper to create and communicate through shared memory, but a bug in one can corrupt all of them.

Q11. What is a zombie process? An orphan?

A zombie has exited but its parent hasn’t called wait() to read its exit status; it holds only a process table entry. Fix the parent (or kill it, so init adopts and reaps the zombies). An orphan is a running process whose parent died; it’s adopted by PID 1 (or a subreaper). In containers, a PID 1 that doesn’t reap children causes zombie buildup, which is why tools like tini exist.

Q12. Load average is 12 on an 8-core machine. Is that bad?

Load average counts tasks running or waiting to run, and on Linux also tasks in uninterruptible sleep (usually disk I/O). 12 on 8 cores means more demand than CPU, or processes stuck on I/O. Check top/vmstat (is %wa high?), iostat -xz 1, and pidstat before concluding anything.

Q13. Disk is full but du shows much less usage than df. Why?

A process still holds a deleted file open, so its space isn’t freed. Find it with lsof +L1 (or lsof | grep deleted), then restart the process or truncate the file through /proc/<pid>/fd/<n>. Another cause: running out of inodes (df -i) with many tiny files.

Q14. Explain file permissions 750 and the sticky bit.

7 (rwx) for the owner, 5 (r-x) for the group, 0 for others. The sticky bit on a directory (like /tmp, drwxrwxrwt) means only a file’s owner can delete or rename it, even though everyone can write to the directory.

A hard link is another directory entry pointing to the same inode; deleting the original name doesn’t remove the data. It can’t cross filesystems or point to directories. A soft (symbolic) link is a small file containing a path; it breaks if the target moves.

Q16. How do signals work? SIGTERM vs SIGKILL?

Signals are asynchronous notifications to a process. SIGTERM (15) asks politely and can be handled, so the app can finish requests and clean up. SIGKILL (9) can’t be caught; the kernel stops the process immediately. Kubernetes sends SIGTERM, waits terminationGracePeriodSeconds (30 by default), then sends SIGKILL, so apps must handle SIGTERM for graceful shutdown.

Q17. What is systemd and how do you debug a failing service?

The init system and service manager on most distributions. Debug with systemctl status <svc>, journalctl -u <svc> -e (or -f to follow), check the unit file with systemctl cat <svc>, and systemctl daemon-reload after editing it.

Q18. What do you run in the first minute on a slow Linux server?

The checklist from Netflix’s Linux Performance Analysis in 60,000 Milliseconds:

uptime                 # load averages trend
dmesg -T | tail        # OOM kills, disk or network errors
vmstat 1               # run queue, memory, swap, CPU split
mpstat -P ALL 1        # imbalanced CPUs
pidstat 1              # which processes use CPU
iostat -xz 1           # disk utilization and latency
free -m                # memory and page cache
sar -n DEV 1           # network throughput
sar -n TCP,ETCP 1      # TCP connections and retransmits
top                    # overview

Organize the findings with the USE method: for every resource check Utilization, Saturation and Errors.

Q19. What is the OOM killer?

When the system (or a cgroup) runs out of memory, the kernel picks a process to kill based on an “oom score” (mostly memory size, adjustable via oom_score_adj). In Kubernetes, a container that exceeds its memory limit is OOM-killed and shows OOMKilled with exit code 137.

Q20. What are namespaces and cgroups?

The two kernel features containers are built on. Namespaces isolate what a process can see (PID, network, mount, UTS hostname, IPC, user, cgroup). cgroups limit and account what it can use (CPU, memory, I/O, PIDs). Modern distributions and Kubernetes use cgroup v2.


3. Networking

Q21. What happens when you type a URL into a browser and press Enter?

  1. Browser checks its caches, then resolves the name via DNS (stub resolver, recursive resolver, root, TLD, authoritative servers; answers are cached per TTL).
  2. TCP three-way handshake with the IP (SYN, SYN-ACK, ACK), or a QUIC handshake over UDP for HTTP/3.
  3. TLS handshake: certificate validation, key agreement (TLS 1.3 needs one round trip).
  4. HTTP request; it may hit a CDN, a load balancer, a reverse proxy, then the app.
  5. Response, rendering, more requests for assets.

A detailed community version: alex/what-happens-when.

Q22. TCP vs UDP?

TCP: connection-oriented, reliable, ordered delivery, flow and congestion control. UDP: connectionless, no delivery guarantees, low overhead; used by DNS, video, gaming and QUIC (which builds its own reliability on top of UDP).

Q23. Explain the DNS record types you use most.

A/AAAA (name to IPv4/IPv6), CNAME (alias to another name, not allowed at the zone apex), MX (mail), TXT (verification, SPF, DKIM), NS (delegation), SRV (service location), CAA (which CAs may issue certificates). Mention TTL and why you lower it before a migration.

Q24. L4 vs L7 load balancer?

L4 routes by IP and port (TCP/UDP) without reading the payload; fast and protocol-agnostic. L7 understands HTTP, so it can route by host and path, terminate TLS, add headers, retry and do canary splits.

Q25. What’s a TIME_WAIT and why might you see thousands of them?

The side that closes a TCP connection first keeps it in TIME_WAIT (typically 60 seconds on Linux) so late packets don’t confuse a new connection with the same tuple. Thousands usually mean many short-lived connections; fix with connection reuse (keep-alive, pooling) rather than tuning kernel flags blindly.

Q26. How do you troubleshoot “can’t connect to service X”?

Work up the layers: name resolves? (dig), route and reachability? (ping, traceroute/mtr), port open? (nc -vz host port), firewall/security group? TLS ok? (openssl s_client -connect host:443), HTTP response? (curl -v). On the server: is it listening on the right interface (ss -tlnp), and what do the logs say?

Q27. What is a CIDR block? How many addresses in a /24 and a /20?

A prefix notation for IP ranges. /24 = 256 addresses, /20 = 4,096. Cloud providers reserve a few in each subnet (AWS reserves 5), so usable counts are lower.


4. Containers and Docker

Q28. Container vs virtual machine?

A VM virtualizes hardware and runs its own kernel. A container is a process (or group) on the host kernel, isolated with namespaces and limited with cgroups. Containers start in milliseconds and are lighter, but share the kernel, so isolation is weaker. Sandboxed runtimes (gVisor, Kata Containers) and microVMs (Firecracker) narrow that gap.

Q29. How do image layers work and why does Dockerfile order matter?

Each instruction creates a cached layer. When one layer changes, all layers after it rebuild. Copy dependency manifests and install dependencies before copying source code so code changes don’t reinstall dependencies.

Q30. How do you make an image small and secure?

Multi-stage builds (compile in one stage, copy only the binary into a minimal runtime image; see Docker docs), minimal or distroless base images, a .dockerignore, pinned base image versions or digests, a non-root USER, no secrets in layers (use build secrets), and image scanning in CI.

Q31. CMD vs ENTRYPOINT?

ENTRYPOINT sets the executable; CMD provides default arguments (or the default command if no entrypoint). Use the exec form (["app", "--flag"]) so your process is PID 1 and receives signals directly; the shell form wraps it in /bin/sh -c, which may not forward SIGTERM.

Q32. COPY vs ADD?

Prefer COPY. ADD also extracts local tar archives and can fetch URLs, which is surprising behavior to hide in a build.

Q33. How do containers talk to each other?

On the same host, through a user-defined bridge network with built-in DNS by container name. In Kubernetes, every pod gets its own IP, and Services provide stable names and virtual IPs.

Q34. Docker Engine vs containerd vs CRI-O?

Docker Engine is a full developer toolchain (build, run, compose). containerd and CRI-O are lighter runtimes that implement Kubernetes’ Container Runtime Interface. Kubernetes removed the built-in dockershim in v1.24, so clusters use containerd or CRI-O directly; images built with Docker still run because they’re standard OCI images.


5. Kubernetes

Q35. Explain Kubernetes architecture.

Control plane: kube-apiserver (the front door; everything talks to it), etcd (consistent key-value store of cluster state), kube-scheduler (assigns pods to nodes), kube-controller-manager (reconciliation loops for Deployments, nodes, jobs and more), and the cloud-controller-manager. Each node: kubelet (runs pods, reports status), a container runtime, and usually kube-proxy (Service networking; some CNIs such as Cilium replace it with eBPF).

The core idea is declarative reconciliation: you declare desired state, controllers keep moving actual state toward it.

Q36. Pod vs Deployment vs ReplicaSet vs StatefulSet vs DaemonSet vs Job?

Object Use for
Pod Smallest unit: one or more containers sharing network and volumes. Rarely created directly
ReplicaSet Keeps N identical pods running; managed by a Deployment
Deployment Stateless apps with rolling updates and rollback
StatefulSet Stable identity and per-pod storage: databases, Kafka, ZooKeeper
DaemonSet One pod per node: log shippers, node exporters, CNI agents
Job / CronJob Run to completion, once or on a schedule

Q37. Service types?

ClusterIP (internal virtual IP, the default), NodePort (a port on every node), LoadBalancer (provisions a cloud load balancer), ExternalName (DNS CNAME). A headless Service (clusterIP: None) returns pod IPs directly, used with StatefulSets. See Service docs.

Q38. Ingress vs Gateway API? What happened to ingress-nginx?

Ingress is the original L7 routing API. Gateway API is its successor: role-oriented (infrastructure owners manage Gateways, app teams manage HTTPRoutes), more expressive (header matching, traffic splitting, multiple protocols) and portable across implementations (gateway-api.sigs.k8s.io).

The community ingress-nginx controller was retired: the Kubernetes project announced in November 2025 that best-effort maintenance would end in March 2026, after which there are no further releases or security fixes (announcement, follow-up statement). Existing installs keep working but are unpatched. A strong interview answer: migrate to a maintained Gateway API implementation or another maintained controller, and plan for annotations that don’t map one to one. Don’t confuse it with NGINX’s own commercially maintained controller, which is a separate project.

Q39. Liveness vs readiness vs startup probes?

Common mistake: a liveness probe that checks a downstream database. When the DB blips, every pod restarts and you turn a partial outage into a full one. Liveness should check only the process itself.

Q40. Requests vs limits?

Requests are what the scheduler reserves; limits are the cap enforced at runtime. Exceeding a memory limit gets the container OOM-killed; exceeding a CPU limit gets it throttled. QoS classes follow: Guaranteed (requests = limits for all containers), Burstable, BestEffort (none set; evicted first). Many teams set memory limit = request and leave CPU limits off or generous to avoid throttling latency-sensitive apps; explain the trade-off rather than claiming one rule. Docs: Resource management.

Q41. A pod is stuck in Pending. What do you check?

kubectl describe pod and read the Events: insufficient CPU/memory on nodes, unsatisfiable node selectors, affinity or taints without tolerations, a PersistentVolumeClaim that can’t bind (wrong StorageClass, zone mismatch), or a ResourceQuota exceeded. If the cluster autoscaler is on, check why it didn’t add a node.

Q42. A pod is in CrashLoopBackOff. What do you do?

kubectl describe pod <pod>              # events, last state, exit code
kubectl logs <pod> --previous           # logs from the crashed container
kubectl get pod <pod> -o yaml           # env, mounts, probes, resources

Common causes: app error at startup (bad config, missing env var or secret), exit code 137 (OOMKilled, raise memory or fix the leak), a liveness probe that kills it too early (add a startup probe), wrong command/entrypoint, or a dependency it exits on. Reproduce with kubectl debug or by running the image locally. Official guide: Debug Pods.

Q43. ImagePullBackOff?

Wrong image name or tag, private registry without imagePullSecrets or node IAM permissions, rate limits on public registries, or the node can’t reach the registry (network policy, proxy, DNS).

Q44. How does a rolling update work, and how do you roll back?

The Deployment creates a new ReplicaSet and shifts pods over, controlled by maxSurge and maxUnavailable, and only proceeds as new pods become Ready. Roll back with kubectl rollout undo deployment/<name>; in GitOps setups you revert the commit instead so Git stays the source of truth.

Q45. ConfigMap vs Secret? Are Secrets secure?

Both inject configuration as env vars or files. Secrets are only base64-encoded by default; protect them with etcd encryption at rest, strict RBAC, and ideally an external secret manager (cloud secret managers via the External Secrets Operator, or Vault). Never commit plain Secrets to Git; use sealed/encrypted secrets if they must live there.

Q46. How does autoscaling work?

Q47. What is a PodDisruptionBudget?

It limits how many pods of an app can be voluntarily evicted at once (node drains, upgrades). Without one, a node drain can take down all replicas of a service.

Q48. How do NetworkPolicies work?

They’re pod-level firewalls selected by labels. By default all pod traffic is allowed; once a policy selects a pod, only explicitly allowed traffic gets in (or out). They need a CNI that enforces them (Calico, Cilium and others).

Q49. How do you secure a cluster?

RBAC with least privilege, Pod Security Standards (restricted profile where possible, see docs), non-root containers with read-only root filesystems, NetworkPolicies, secrets encryption, image signing and admission policies, private API endpoint, audit logs, and keeping the cluster version within the supported window (the project supports roughly the three most recent minor releases).

Q50. Helm vs Kustomize?

Helm is a package manager with templated charts and release history; great for distributing third-party software. Kustomize patches plain YAML with overlays per environment and is built into kubectl. Many teams use Helm for vendor software and Kustomize for their own apps.


6. CI/CD and Deployment Strategies

Q51. CI vs continuous delivery vs continuous deployment?

CI: every change is merged often and automatically built and tested. Continuous delivery: every change that passes is deployable at any time, with a human pressing the button. Continuous deployment: it goes to production automatically.

Q52. What does a good pipeline look like?

  1. Lint, unit tests, static analysis (fast, minutes).
  2. Build an immutable artifact once (container image tagged with the commit SHA).
  3. Security: dependency and image scanning, secret scanning, SBOM, signing.
  4. Deploy to staging; integration and smoke tests.
  5. Progressive production rollout with automated checks and rollback.

Principles: build once and promote the same artifact, keep it fast, make failures obvious, keep pipeline config in the repo.

Q53. Compare deployment strategies.

Strategy How Pros Cons
Recreate Stop old, start new Simple Downtime
Rolling Replace instances gradually Default in Kubernetes, no extra capacity Two versions run at once; slow rollback
Blue-green Full new environment, switch traffic (Fowler) Instant switch and rollback Double capacity; database changes still tricky
Canary Small % of traffic first, then increase (Fowler) Real traffic validates the change, limits blast radius Needs good metrics and traffic splitting
Feature flags Deploy dark, enable per user (Fowler/Hodgson) Separates deploy from release Flag debt, testing combinations

Q54. How do you handle database migrations with zero downtime?

Expand and contract: (1) add the new column/table in a backward-compatible way, (2) deploy code that writes both and reads old, (3) backfill, (4) switch reads, (5) stop writing the old, (6) drop it in a later release. Never rename or drop in the same release that changes the code using it.

Q55. What is GitOps?

Git holds the desired state of environments, and an in-cluster agent (Argo CD or Flux) continuously pulls and reconciles. Benefits: audit trail, easy rollback (revert a commit), drift detection, no CI system needing cluster-admin credentials.

Q56. How do you keep CI secrets safe?

Use the CI provider’s secret store or short-lived credentials via OIDC federation to the cloud (no long-lived keys), restrict secrets to protected branches and environments, don’t expose secrets to pull requests from forks, pin third-party actions/plugins to a commit SHA, and grant tokens minimal permissions. See OWASP Top 10 CI/CD Security Risks.

Q57. A pipeline takes 40 minutes. How do you speed it up?

Measure stage times first. Then: cache dependencies and Docker layers, run tests in parallel and shard them, only run affected tests in monorepos, move slow end-to-end tests off the critical path, use bigger or warm runners, and remove redundant builds.


7. Infrastructure as Code: Terraform and OpenTofu

Q58. What is IaC and why use it?

Defining infrastructure in versioned code instead of console clicks. You get review, history, repeatability across environments, and automated drift detection.

Q59. Declarative vs imperative?

Declarative tools (Terraform, CloudFormation, Kubernetes manifests) describe the end state; the tool figures out the steps. Imperative tools (scripts, many Ansible playbooks) describe the steps. Declarative is easier to reason about for infrastructure.

Q60. What is Terraform state and why does it matter?

A mapping from your configuration to real resource IDs and attributes. Terraform uses it to compute plans. Store it remotely (S3, GCS, Terraform Cloud/HCP, etc.) with locking so two applies can’t run at once, encrypt it (it can contain secrets), and never edit it by hand except with terraform state commands. Docs: state, locking.

Q61. Terraform vs OpenTofu?

In 2023 HashiCorp changed Terraform’s license from MPL 2.0 to the Business Source License. The community forked the last open version as OpenTofu, now under the Linux Foundation. They remain largely compatible for typical configurations, with features diverging over time. HashiCorp itself was acquired by IBM. In interviews, knowing the history and that your skills transfer between the two is enough.

Q62. How do you structure Terraform for multiple environments?

Reusable modules for components, a separate root configuration and state per environment (and often per component, to keep the blast radius small), variables per environment, and a pipeline that runs plan on pull requests and apply after approval. Workspaces work for nearly identical environments, but separate directories are clearer when environments differ.

Q63. Someone changed a resource in the console. What happens?

The next plan shows drift and proposes to revert it. Decide whether the manual change should be codified (update the code) or reverted. Prevent it with read-only console access in production and scheduled drift detection.

Q64. How do you bring existing resources under Terraform?

Write the resource config and use import blocks (Terraform 1.5+ and OpenTofu) or terraform import, then run plan until it shows no changes. Newer versions can generate config for imported resources.

Q65. count vs for_each?

count indexes by number, so removing an item in the middle shifts indexes and can destroy and recreate resources. for_each keys by string, so items are stable. Prefer for_each for collections.

Q66. Terraform vs Ansible?

Terraform provisions infrastructure (networks, VMs, managed services) declaratively with state. Ansible configures machines and runs procedures over SSH, agentless. With immutable images and containers, configuration management matters less, but Ansible is still common for VMs, network devices and one-off operations.


8. Observability

Q67. Monitoring vs observability?

Monitoring checks known failure modes with predefined dashboards and alerts. Observability is the ability to ask new questions about system behavior from its outputs (high-cardinality metrics, structured logs, traces) without shipping new code. You need both.

Q68. Metrics, logs and traces: when do you use each?

OpenTelemetry is the vendor-neutral standard for producing all three.

Q69. What are the golden signals, RED and USE?

Q70. Why use percentiles instead of averages for latency?

Averages hide the tail. If p50 is 80 ms and p99 is 4 seconds, one request in a hundred is terrible, and a page that makes many backend calls will hit that tail often. Note that you can’t average percentiles across instances; aggregate histograms instead.

Q71. How does Prometheus work?

A pull-based time-series database: it scrapes /metrics endpoints on a schedule, stores samples with labels, and evaluates PromQL rules for alerts that Alertmanager routes and deduplicates (docs). Watch label cardinality: a label with user IDs can blow up memory. For long-term or multi-cluster storage, teams add Thanos, Cortex/Mimir or a managed service.

Q72. What makes a good alert?

It’s urgent, actionable, user-impacting, and rare. Page on symptoms (SLO burn, error rate) rather than causes (high CPU). Every page should have a runbook link. Alerts nobody acts on should be deleted or downgraded to tickets.


9. SLOs, Error Budgets and Reliability

Q73. SLI vs SLO vs SLA?

Reference: Service Level Objectives.

Q74. What is an error budget?

1 - SLO. With 99.9% over 30 days, you can “spend” about 43 minutes of full downtime (or the equivalent in failed requests). While budget remains, ship fast; when it’s exhausted, slow down and invest in reliability. It turns “reliability vs features” into a data-driven agreement.

SLO Allowed downtime per 30 days Per year
99% ~7.2 hours ~3.65 days
99.9% ~43.2 minutes ~8.8 hours
99.95% ~21.6 minutes ~4.4 hours
99.99% ~4.3 minutes ~52.6 minutes

Q75. What is a burn-rate alert?

An alert on how fast you’re consuming the error budget. A burn rate of 1 uses the budget exactly over the SLO window; 14.4 exhausts a 30-day budget in about 2 days. Common practice is multi-window alerts: page on a fast burn over a short and long window together, ticket on a slow burn. Details: Alerting on SLOs.

Q76. Why not aim for 100% reliability?

Users can’t tell 99.99% from 100% because their own networks and devices fail more often; each extra nine costs much more; and 100% means never changing anything. Pick the target users actually need.

Q77. How do you make a service highly available?

Remove single points of failure: multiple instances across availability zones behind a load balancer, health checks, replicated data with tested failover, graceful degradation, timeouts and retries with backoff and jitter, circuit breakers, rate limiting, and capacity headroom. Then test it (game days, chaos experiments; see Principles of Chaos Engineering).

Q78. What’s the danger of retries?

Retry storms: if every layer retries 3 times, one failing dependency receives many times the normal load and can’t recover. Use exponential backoff with jitter, retry budgets, retry only idempotent operations, and retry at one layer.

Q79. RTO vs RPO?

RTO: how long you can be down. RPO: how much data (in time) you can lose. They drive backup frequency, replication mode and DR design. Untested backups don’t count; restore drills do.


10. Incident Response and Postmortems

Q80. Walk me through how you handle an incident.

  1. Detect and declare early; it’s cheaper to downgrade than to declare late.
  2. Assign roles: incident commander (coordinates, doesn’t debug), operations/subject experts, communications lead.
  3. Mitigate first, diagnose later: roll back the last deploy, fail over, shed load, disable a feature flag.
  4. Communicate on a regular cadence to stakeholders and a status page.
  5. Resolve and monitor.
  6. Blameless postmortem with timeline, impact, contributing factors and tracked action items.

Good public references: PagerDuty Incident Response docs, Atlassian Incident Handbook.

Q81. What makes a postmortem blameless and useful?

It focuses on how the system allowed the failure, not who pressed the button; people who made mistakes are treated as sources of information. Useful postmortems have a clear timeline, customer impact, contributing factors (often several), what went well, and owned, dated action items that are actually followed up. See Postmortem Culture and a large public collection at danluu/post-mortems.

Q82. What’s the first thing you do if errors spike right after a deploy?

Roll back (or turn off the flag), then investigate. Don’t debug forward under pressure when a known-good version exists, unless the deploy included a non-reversible change such as a database migration.

Q83. How do you reduce on-call pain?

Track pages per shift, delete noisy alerts, fix the top recurring causes, write runbooks, automate common remediations, and make sure engineers who build the service share its on-call.


11. Security and Supply Chain

Q84. What is DevSecOps / shift left?

Building security into every stage: threat modeling in design, SAST and dependency scanning in CI, secrets scanning on commits, image scanning, policy as code, least-privilege runtime, and monitoring. Security becomes part of the pipeline rather than a gate at the end.

Q85. What is software supply chain security? SBOM, SLSA, signing?

Protecting everything that goes into your artifact. An SBOM lists components and versions so you can answer “are we affected by this CVE?” quickly. SLSA defines levels of build integrity and provenance. Signing (for example with Sigstore’s cosign) proves an image came from your pipeline, and admission policies can reject unsigned images.

Q86. How do you manage secrets?

A central secret manager (cloud secret manager or Vault), short-lived dynamic credentials where possible, workload identity instead of static keys, rotation, audit logs, and scanning to catch leaks. If a secret leaks into Git, rotate it first; rewriting history isn’t enough.

Q87. Least privilege in the cloud: how?

Separate accounts/projects per environment, roles per workload, no wildcard permissions, SSO with short sessions for humans, break-glass accounts monitored, and periodic access reviews using access-analysis tools.


12. Cloud Architecture

Q88. Design a highly available web app on a cloud provider.

DNS to a CDN, then a regional L7 load balancer; stateless app instances (containers or VMs) in an autoscaling group across at least two or three availability zones; a managed database with a synchronous standby in another zone and read replicas; cache (Redis/Memcached); object storage for files; queues for async work; private subnets with NAT for outbound; secrets manager; centralized logs and metrics; backups and a tested restore. Mention multi-region only if requirements demand it, and explain the cost and consistency trade-offs.

Q89. Availability zone vs region?

A region is a geographic area; zones are isolated data centers within it with low-latency links. Multi-AZ protects against a data center failure; multi-region protects against a regional outage and serves distant users, at much higher complexity.

Q90. How do you control cloud costs?

Tag everything and allocate costs to teams, rightsize instances and Kubernetes requests, autoscale and schedule non-production off-hours, use commitments (savings plans/reserved) for steady load and spot/preemptible for fault-tolerant work, set storage lifecycle policies, watch data transfer (cross-AZ and egress), and set budgets with alerts.

Q91. Serverless vs containers?

Serverless functions: no servers to manage, scale to zero, pay per use; limits on runtime, cold starts, and harder local testing. Containers: more control and portability, steady performance, better for long-running services. Many architectures use both.

Reference: AWS Well-Architected Framework (the pillars apply to any cloud).


13. Troubleshooting Scenarios

Interviewers care about your method: clarify, check the obvious, narrow with data, mitigate, then find root cause. Narrate your hypotheses.

Scenario 1: “The website is slow.”

Clarify: everyone or some users? since when? all pages or one? Check dashboards: latency by endpoint, error rate, traffic. If traffic jumped: scale or rate-limit. If one dependency’s latency rose (DB, external API): look there (slow queries, connection pool exhaustion, locks). Check recent deploys and config changes. On hosts: CPU, memory, GC pauses, disk I/O. Mitigate (roll back, scale out, cache, shed load), then root-cause.

Scenario 2: “We get intermittent 502s from the load balancer.”

502 means the proxy got a bad or no response from the upstream. Suspects: pods being killed during deploys without graceful shutdown (missing preStop delay, readiness not flipping first), keep-alive timeout mismatch (upstream closes idle connections before the load balancer does; make the app’s idle timeout longer than the LB’s), OOM-killed or crashing instances, or upstream timeouts.

Scenario 3: “DNS resolution inside the cluster is slow or failing.”

Check CoreDNS pods, their CPU and logs; look at ndots:5 in pod resolv.conf causing many search-domain lookups for external names (use fully qualified names with a trailing dot or lower ndots); conntrack table exhaustion on nodes; and NodeLocal DNSCache as a fix for scale.

Scenario 4: “A node keeps going NotReady.”

kubectl describe node: conditions like MemoryPressure, DiskPressure, PIDPressure. On the node: kubelet logs (journalctl -u kubelet), container runtime health, disk usage (images and logs filling /var), network to the API server, kernel messages.

Scenario 5: “terraform apply failed halfway.”

Don’t panic: state records what was created. Read the error, fix the cause (permissions, quota, dependency), run plan again and apply. If the state lock is stuck after a crash, confirm no apply is running, then force-unlock with the lock ID.

Scenario 6: “Disk is 100% full on a production server.”

Find what’s growing (df -h, du -xh / | sort -h | tail), check for deleted-but-open files (lsof +L1), clear safe targets (rotated logs, old images with docker image prune, package caches), then fix the cause: log rotation, retention, alerts at 80%.

Practice environments

SadServers (broken Linux servers to fix, free tier), Killercoda (free browser Kubernetes and Linux playgrounds), iximiuz Labs (hands-on container and networking labs, free and paid).


14. Scripting and Coding Questions

Typical tasks (do them in Python and Bash):

  1. Parse an access log and print the top 10 IPs by request count and the share of 5xx responses.
  2. Find all files over 100 MB modified in the last 7 days.
  3. Write a script that checks a list of URLs and reports status code and latency, in parallel.
  4. Rotate logs: compress files older than a day, delete those older than 30.
  5. Given a JSON list of pods with resource requests, compute total requests per namespace.
  6. Implement exponential backoff with jitter around a flaky function.
  7. Tail a file and alert when a pattern appears more than N times per minute.

Bash essentials worth knowing cold: set -euo pipefail, quoting variables ("$var"), trap for cleanup, xargs -P for parallelism, awk and sort | uniq -c | sort -rn. Run ShellCheck on everything, and read Bash Pitfalls.

One-liner for task 1:

awk '{print $1}' access.log | sort | uniq -c | sort -rn | head -10

15. Behavioral Questions for DevOps and SRE

Question What a strong answer shows
Tell me about the worst incident you handled. Calm process, mitigation first, clear communication, learning
Tell me about something you automated. Measured before/after: hours saved, errors avoided
A developer team keeps pushing risky changes. What do you do? Influence through data (error budgets), guardrails, not blame
Describe a time you pushed back on a deadline for reliability reasons. Trade-off framing, compromise
What did you change after a postmortem? Follow-through on action items
How do you onboard teams onto a new platform? Empathy for users, docs, paved roads

Write 6-8 stories with numbers. See the Behavioral Interview Handbook for structure.


Best Resources

Free books and docs

Resource Why
Google SRE books: Site Reliability Engineering, The Site Reliability Workbook, Building Secure and Reliable Systems Free online; the source of most SRE vocabulary
The Linux Command Line by William Shotts Free book; shell fundamentals
Kubernetes documentation Concepts and tasks pages answer many interview questions directly
Docker docs: build best practices Official image-building guidance
Terraform docs / OpenTofu docs State, modules, providers
OpenTelemetry docs Modern instrumentation
DORA research Delivery metrics and capabilities
Brendan Gregg’s Linux performance page Performance tools and methods
The Twelve-Factor App Cloud-native app principles
The Book of Secret Knowledge Huge list of CLI tools and references

Practice and question banks

Resource Cost
bregman-arie/devops-exercises Free, very large question bank
Kubernetes The Hard Way Free; build a cluster by hand to understand every component
SadServers Free tier + paid
Killercoda Free tier + paid
roadmap.sh DevOps Free learning path
CNCF Landscape Free map of the cloud-native ecosystem

Certifications (paid, optional)

Cert When it helps
CKA Hands-on Kubernetes admin; respected because it’s a practical exam
CKAD Kubernetes for developers
Cloud associate-level certs (AWS, Azure, Google Cloud) Career switchers needing proof of cloud basics

Certifications open doors for career changers; experienced candidates are judged on what they’ve run in production.

Best pick: the free SRE book chapters on SLOs, monitoring and postmortems, plus Kubernetes The Hard Way and a few hours on SadServers. Those three cover the questions that most often separate candidates.


Hands-On Projects That Impress Interviewers

  1. End-to-end platform for a small app. Terraform/OpenTofu a VPC and managed Kubernetes cluster, deploy a two-service app with Helm or Kustomize via Argo CD, expose it through a Gateway API implementation, add TLS with cert-manager.
  2. Observability stack. Instrument the app with OpenTelemetry, ship to Prometheus/Grafana (or a free tier of a hosted service), define an SLO and a burn-rate alert, write a runbook.
  3. Secure pipeline. CI that tests, builds once, scans, generates an SBOM, signs the image and deploys only signed images.
  4. Chaos day. Kill pods, a node and the database primary on purpose; write the postmortem.
  5. Cost report. Show what the setup costs per month and what you’d change to cut it in half.

Write a README for each with an architecture diagram and the trade-offs you made. That README is what interviewers read.


FAQ

What are the most common DevOps interview questions? CI/CD pipeline design, Docker basics, Kubernetes objects and debugging (CrashLoopBackOff, Pending), Terraform state, Linux troubleshooting, monitoring and alerting, deployment strategies, and an incident story.

What’s the difference between a DevOps engineer and an SRE interview? SRE loops add SLOs and error budgets, deeper Linux and networking internals, incident management, and usually more coding, sometimes a standard algorithms round.

Do DevOps engineers need to code? Yes. At minimum Bash and Python for automation; Go is common in Kubernetes tooling. You’ll usually get a scripting task.

Is Kubernetes required for DevOps jobs? Not everywhere, but it’s in most job descriptions. Knowing it at the level of this guide is a safe bet.

Which cloud should I learn first? The one in the job descriptions you’re targeting. AWS has the largest market share; the concepts (networks, IAM, compute, storage, managed databases) transfer.

Is the CKA worth it? Useful for career switchers and for passing CV filters; less important if you can show real production experience.

How do I answer “tell me about an outage you caused”? Own it plainly, focus on detection, mitigation and what changed in the system afterwards. Interviewers distrust candidates who claim they never broke anything.

What should I know about AI in DevOps for 2027 interviews? Be ready to discuss how AI coding tools change the pipeline (more changes, so stronger tests and smaller batches), using AI for incident summaries and log search with human verification, and running AI workloads (GPU scheduling, model serving, cost). DORA’s 2025 report is a good, citable source.


Where to Go Next


Contributing

Pull requests are welcome for corrections, outdated version notes and new questions.

License

CC BY 4.0. Share and adapt with attribution to Ralpberry Labs.

If this helped you, a star helps others find it.

More free resources

Part of the Ralpberry Labs open-source collection. See also Top 100 Open Source.