Top 30 DevOps & Cloud Interview Questions and Answers
30 multiple-choice questions on DevOps & Cloud, of the kind that come up in a technical interview, drawn from 30 bites in the DevOps & Cloud library. Answer them here or read straight down. Every question carries the correct option, why it is correct, and a link to the bite it came from.
Infrastructure, containers, CI/CD, and cloud
30 questions. Pick an answer, or open “Show the answer” to read it.
Answers are graded in your browser. Nothing is saved, and no XP or streak is earned here. The app keeps score.
Question 1 of 30
A company provisions virtual servers in the cloud and manages the operating system, middleware, and application code themselves. Which service model is this?
Show the answer
Answer: c · Infrastructure as a Service
This is IaaS: the vendor manages the physical infrastructure and hypervisor, while the customer manages everything from the OS upward. Platform as a Service is a tempting distractor because candidates often mistakenly label managed virtual machines as PaaS, but true PaaS abstracts away the OS and runtime management entirely.
Read the full bite: Explain the difference between IaaS, PaaS, and SaaS with examples
Question 2 of 30
Which task best fits the SRE definition of toil rather than overhead or engineering project work?
Show the answer
Answer: a · Manually rerunning the same failed batch job every night by hand
Manually rerunning the same job nightly is manual, repetitive, automatable, and scales with the service, the hallmarks of toil. Designing a system is engineering; meetings and interviews are overhead.
Question 3 of 30
What is the core architectural difference that makes a container lighter than a virtual machine?
Show the answer
Answer: c · Containers share the host kernel instead of booting a full guest OS
Containers share the host's kernel and isolate via namespaces and cgroups, avoiding a full guest OS; the compression claim is irrelevant since the weight savings come from not running a separate kernel.
Question 4 of 30
A team merges into a shared branch daily with automated builds and tests. What is the single most important goal of this Continuous Integration practice?
Show the answer
Answer: c · Keeping the integrated codebase in a workable state at all times
The defining goal of CI is maintaining a workable integrated codebase, not deployment, which is the realm of CD. While automation and bug detection are part of the practice, they are mechanisms and secondary benefits rather than the core objective.
Read the full bite: What is CI, and what is its single most important goal?
Question 5 of 30
Why should an internal SLO target be set stricter than the externally promised SLA?
Show the answer
Answer: d · To create a safety margin that triggers internal action before the contract is breached
A stricter SLO gives early warning so the team reacts before violating the SLA and owing penalties. The other options misstate measurement windows, visibility, and the SLI relationship.
Question 6 of 30
When moving from IaaS to SaaS, which responsibility shifts to the cloud provider?
Show the answer
Answer: c · Patching the guest operating system
In IaaS the customer manages the guest OS, but in SaaS the provider assumes that duty. Many beginners incorrectly think the provider also secures their data in SaaS, yet data classification and protection always remain the customer's responsibility.
Read the full bite: How does shared responsibility shift between IaaS and SaaS?
Question 7 of 30
When you run a container from an image, how does Docker handle the image layers and runtime file changes?
Show the answer
Answer: a · It keeps the image layers read-only and adds a writable layer on top for runtime changes.
A container mounts the image's read-only layers and adds a writable layer on top, allowing runtime changes without altering the original image. Option B is wrong because containers are isolated processes that share the host kernel, not mini-VMs that boot their own kernels.
Read the full bite: How do Docker images and containers differ and relate?
Question 8 of 30
A developer pushes to main, triggering a CI pipeline with build, test, and deploy stages. Which outcome best matches typical execution?
Show the answer
Answer: b · A runner builds the project; then multiple runners execute test jobs in parallel; deployment proceeds only if every test job succeeds.
The card states that runners (not the Git server) execute jobs, that jobs within a stage run in parallel, and that a stage must succeed completely before the next stage begins. Option C is tempting because it correctly mentions sequencing but wrongly assumes everything runs sequentially on one machine and ignores the requirement that all jobs pass.
Read the full bite: Describe the typical CI pipeline sequence from push to deploy
Question 9 of 30
Which statement best captures the relationship between SRE and DevOps?
Show the answer
Answer: a · SRE is a prescriptive implementation of the broader DevOps philosophy
SRE provides concrete practices, SLOs, error budgets, blameless postmortems, that implement the abstract DevOps principles. They are complementary, not competing, and they operate at different levels of abstraction.
Question 10 of 30
How does migrating from on-premises infrastructure to the cloud typically change a company's cost model?
Show the answer
Answer: d · It shifts spending from upfront CapEx to ongoing, usage-based OpEx
Cloud replaces large upfront asset purchases with pay-as-you-go operational spend that scales with usage. It does not eliminate costs, runs in the opposite direction of OpEx-to-CapEx, and is a different model, not a guaranteed saving.
Question 11 of 30
A container needs its own eth0 and routing table while its init process appears as PID 1. Which clone flags are required to create it?
Show the answer
Answer: c · CLONE_NEWNET and CLONE_NEWPID
CLONE_NEWNET creates a new Network namespace for isolated interfaces and routing tables, while CLONE_NEWPID creates a new PID namespace so the container's init becomes PID 1. Option A is tempting because it includes the correct PID flag, but CLONE_NEWNS isolates mount points rather than network devices.
Read the full bite: Name three Linux namespaces and explain what each one isolates.
Question 12 of 30
A company automatically deploys its internal tools to production but requires manual sign-off for its customer-facing payment service. What does this mixed strategy best demonstrate?
Show the answer
Answer: d · Different applications may require different pipeline models based on business risk and compliance needs.
The card stresses that the choice between Continuous Delivery and Continuous Deployment is driven by business context, regulatory requirements, and blast radius, and that organizations often run a mixed model. Option A reflects the common misconception that Delivery is just an inferior version of Deployment, while the correct answer captures the intentional, risk-based pipeline design described in the card.
Question 13 of 30
Which approach aligns with the 'build once, deploy many' principle when handling environment-specific database URLs?
Show the answer
Answer: d · Build the container image once, then provide the database URL via environment variables at deployment time
The correct answer preserves artifact immutability by externalizing configuration and deploying the same binary everywhere. Option C is tempting because build arguments appear to parameterize deployments cleanly, but they force per-environment rebuilds that can introduce unverified dependency changes.
Read the full bite: What is a build artifact and why build once deploy many crucial?
Question 14 of 30
For a team with limited cloud expertise migrating an existing on-premises monolith, why is IaaS often the better initial choice over PaaS?
Show the answer
Answer: a · IaaS enables a lower-risk lift-and-shift without forcing an immediate app rewrite
IaaS lets the monolith move largely unchanged, reducing risk while skills are thin, with modernization to PaaS later. IaaS still has real ops overhead, PaaS offers less low-level control, and PaaS can run monoliths but usually needs refactoring.
Question 15 of 30
Which component ultimately enforces CPU and memory limits after the container runtime writes the cgroup configuration at startup?
Show the answer
Answer: d · The Linux kernel scheduler and memory manager, using the configured cgroup values
The Linux kernel scheduler and memory manager enforce cgroup limits continuously using values written by the runtime at startup. It is a common misconception that the Docker daemon actively monitors and throttles containers, but the daemon only configures limits while the kernel handles enforcement.
Read the full bite: How do containers enforce CPU and memory limits via cgroups?
Question 16 of 30
When defining the first SLIs for a user-facing service, what should they primarily measure?
Show the answer
Answer: b · Aspects of the service as experienced by users, such as request success and latency
Good SLIs reflect user-visible behavior, since the goal is to measure user happiness. CPU and deploy counts are internal signals that can look fine while users suffer.
Read the full bite: How do you set SLOs for a service from scratch?
Question 17 of 30
Once runc has started the container process, which statement accurately describes its subsequent behavior?
Show the answer
Answer: b · It exits and becomes stateless, leaving containerd to handle stop, delete, and event monitoring.
runc is a short-lived CLI tool that exits after starting the isolated process, while containerd retains lifecycle ownership. The belief that runc stays resident as a daemon is a common misconception; it is stateless and does not monitor cgroups or namespaces after launch.
Read the full bite: Describe the relationship between containerd and runc in starting a container.
Question 18 of 30
An error budget is fully spent early in the quarter. What is the most appropriate first response?
Show the answer
Answer: d · Invoke the pre-agreed error budget policy and analyze what consumed the budget
The budget is a pre-agreed signal that triggers a policy and a data-driven analysis of the burn. Blaming individuals, a permanent ban, or ignoring it all defeat the budget's purpose as an objective tradeoff tool.
Question 19 of 30
Which scenario best describes a genuine shift-left practice rather than a common misconception?
Show the answer
Answer: b · Integrating static analysis into pull request builds so vulnerabilities are caught before merge
Integrating static analysis into pull request builds moves security feedback to the coding phase, which is the essence of shift left. Hiring more QA staff to test before release only increases test volume at the same late stage, confusing more testing with earlier feedback.
Read the full bite: What does shift left mean in CI/CD, and give two concrete examples?
Question 20 of 30
Which scenario specifically demonstrates elasticity rather than just scalability?
Show the answer
Answer: b · An auto-scaling group automatically adds instances during a traffic spike and removes them when it subsides
Elasticity is the automatic, two-way matching of capacity to demand, including scaling back down. Manual additions, code rewrites, and one-time vertical upgrades show scalability but not the automatic contraction that defines elasticity.
Question 21 of 30
What is the best way to prioritize which toil to automate first?
Show the answer
Answer: c · Rank by return on investment, weighing frequency and time saved against automation effort and risk
Prioritizing by ROI, frequency times time saved versus effort and risk, maximizes recovered engineering time. Irritation, ease alone, or script count are poor proxies for actual impact.
Read the full bite: How do you find and eliminate toil systematically?
Question 22 of 30
What key characteristic separates Infrastructure as Code from traditional imperative server scripting?
Show the answer
Answer: d · IaC defines the desired end state and achieves idempotence through automated reconciliation
True IaC is defined by its declarative, idempotent model that lets the platform reconcile to a desired state, not by the file format used. While IaC definitions are often written in JSON or YAML, simply using those formats without declarative idempotence is still just scripting.
Read the full bite: What is Infrastructure as Code (IaC), and how does it support CI/CD?
Question 23 of 30
In a hybrid cloud setup for a regulated business, which split of components is most appropriate?
Show the answer
Answer: b · Keep regulated data and legacy systems on-premises while running scalable customer-facing front ends in the public cloud
Hybrid keeps sensitive, regulated, and hard-to-migrate systems in the controlled private environment while putting elastic, customer-facing workloads in the public cloud. The other options place regulated data in the cloud or misallocate the elastic and sensitive components.
Read the full bite: When hybrid cloud beats public or private
Question 24 of 30
Which statement correctly describes the relationship between OCI image layers and OverlayFS in container runtime?
Show the answer
Answer: b · OCI specifies layer tarballs and manifests, while OverlayFS is the in-kernel driver that assembles them at runtime
OCI governs the packaging and distribution of images as tarballs and manifests, while OverlayFS is solely a Linux kernel filesystem driver that mounts those layers at runtime. Distractor B is a common misconception that conflates the runtime driver with the image specification itself.
Question 25 of 30
A platform team notices their pipeline is consistently green, but lead time for changes has grown from hours to days. Which diagnostic approach best aligns with value stream thinking?
Show the answer
Answer: d · Decompose lead time into queue, active pipeline, and post-pipeline release intervals
Decomposing lead time reveals whether waste hides in pre-merge queues, slow green stages, or post-merge deployment friction. Investigating test flakiness is tempting but misguided because a green pipeline rules out build failures as the cause.
Read the full bite: Pipeline is green but lead time grows. Three areas to investigate?
Question 26 of 30
Why does an image built with Docker run correctly on a Kubernetes node that uses containerd and runc instead of the Docker daemon?
Show the answer
Answer: c · They all conform to OCI image and runtime specifications
Interoperability comes from shared OCI image and runtime specs, so any compliant tool can consume the same artifact; there is no rebuild or embedded Docker daemon involved.
Read the full bite: What is the OCI and why do its specs matter?
Question 27 of 30
What is the most realistic downside a team accepts when prioritizing strict portability across two cloud providers?
Show the answer
Answer: a · They forgo the deepest managed services and slow feature velocity
Portability forces a lowest-common-denominator design, sacrificing best-of-breed managed services and adding overhead that slows delivery. Faster shipping is the opposite of what multi-cloud abstraction produces.
Read the full bite: Designing for portability across two clouds
Question 28 of 30
Why is blamelessness essential to a postmortem's effectiveness at improving reliability?
Show the answer
Answer: c · It creates psychological safety so engineers disclose full, honest details needed to fix systemic causes
Blamelessness removes fear of punishment so people share complete information, and you can only fix what you fully understand. It does not skip root cause or action items, nor magically prevent recurrence by itself.
Read the full bite: What makes a blameless postmortem effective?
Question 29 of 30
Which scenario best illustrates a fundamental CI/CD difference between monoliths and microservices regarding blast radius and artifact indivisibility?
Show the answer
Answer: a · A microservice team deploys a signed container side-by-side with the previous version, while a monolith rollback requires reverting the entire application
This captures the core idea that monoliths produce a single indivisible artifact requiring full rollback, while microservices support independent side-by-side deployments with signed images. Option C reverses these architectures and promotes the shared-pipeline anti-pattern the card explicitly warns destroys team autonomy.
Read the full bite: How does your CI/CD strategy differ between monoliths and microservices?
Question 30 of 30
When bursting compute into the public cloud from on-prem, which factor most often becomes the real bottleneck?
Show the answer
Answer: d · Data gravity and the latency or cost of reaching on-prem data
Compute scales quickly, but the data the workload needs usually lives on-prem, so latency and egress dominate. Instance variety and quotas are minor and easily addressed by comparison.
Read the full bite: Hybrid cloud bursting from a VMware footprint
Could you explain these out loud?
That is what an interview actually tests. Tezvyn gives you questions like these with what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.