Interview Q&A · questions with model answers
DevOps Engineer Interview Questions
Part of the study plan for: DevOps Engineer · Site Reliability Engineer (SRE)
Ordered by how often they're asked. Most-asked answers are free to read in full; members see every answer and can rate their confidence on each.
-
Most asked How do you handle database schema migrations in an automated deployment pipeline?
Make every migration backward compatible with the code that is running (expand and contract), run migrations as a separate, controlled pipeline step before the new code rolls out (not on application…
-
Most asked How do you handle secrets in CI/CD pipelines securely?
Avoid long-lived credentials: use OIDC federation from the CI system to the cloud (GitHub Actions, GitLab and others can assume cloud roles with short-lived tokens), fetch application secrets at…
-
Most asked What happens when you type a URL into a browser and press Enter?
The browser parses the URL, checks caches, resolves the domain through DNS (browser, OS, resolver, root, TLD and authoritative servers), opens a TCP connection (or QUIC for HTTP/3) to the IP,…
-
Most asked How does DNS work, and what DNS issues have you seen in production?
A recursive resolver answers a query by asking root servers, then the TLD servers, then the domain's authoritative servers, and caches results for the record's TTL. Record types include A/AAAA…
-
Most asked A Dockerfile copies a .env file, uses it, and deletes it in a later RUN step. Is the secret safe?
No. Each instruction creates a layer and the file remains in the layer that added it; the deletion only hides it in later layers. Anyone who can pull the image can extract it. Rotate the secret,…
-
Most asked How do Kubernetes rolling updates work, and how do maxSurge and maxUnavailable affect them?
The Deployment controller creates a new ReplicaSet and shifts pods from old to new in steps. maxSurge is how many pods above the desired count may exist, and maxUnavailable how many may be missing;…
-
A service shows 30% average CPU but high p99 latency. How could CPU limits be involved?
CPU limits are enforced as a CFS quota per 100 ms period. Bursty, multi-threaded work can use the whole quota early in a period and then all threads are paused until the next one, adding tens of…
-
How do you approach a monorepo's CI at scale?
Build and test only what a change affects, using a build tool that understands the dependency graph (Bazel, Nx, Turborepo, Pants, Gradle), with remote caching so unchanged targets are never rebuilt;…