>DevOps Interview KB

Senior DevOps Interview Questions

516 questions across 39 categories

Deeper trade-off and design questions — why a specific approach was chosen, what breaks at scale, and how to reason about a system you didn't build.

Two people merged to main within a minute of each other, and now two deployment workflow runs are executing at the same time, racing to deploy. How do you prevent this?

IntermediateGitHub Actions6 min

Your GitHub Actions build spends 3 of its 5 minutes reinstalling the same dependencies every single run. How would you design caching to fix that without risking stale or corrupted cache issues?

IntermediateGitHub Actions6 min

How would you design a GitHub Actions deployment workflow so that deploying to production requires a manual approval, while deploying to staging doesn't?

IntermediateGitHub Actions6 min

You're testing a library against 4 language versions and 3 operating systems using a matrix build. One combination fails immediately, but you want the others to keep running. How do you configure that?

IntermediateGitHub Actions5 min

You want to share common CI logic across 20 repositories. When would you use a reusable workflow versus a composite action?

IntermediateGitHub Actions6 min

Why is it specifically dangerous to use self-hosted GitHub Actions runners on a public repository, in a way that doesn't apply to a private repository?

AdvancedGitHub Actions7 min

A required status check on a GitHub branch protection rule is permanently stuck showing "Expected — Waiting for status to be reported", blocking every PR from merging. What's going on?

IntermediateGitHub7 min

An internal tool making GitHub API calls started getting 403 errors, but checking the rate limit endpoint shows plenty of requests remaining. What else could be causing this?

IntermediateGitHub7 min

Your team needs to build an integration that automatically comments on PRs across the organization's repos. Should you use a GitHub App, an OAuth App, or a personal access token?

IntermediateGitHub7 min

Your org requires branch protection on main everywhere, but a critical tool has just one maintainer who finds required review genuinely slows down urgent fixes. How do you balance this?

IntermediateGitHub6 min

A CODEOWNERS file lists a team as owner of a directory, but PRs touching that directory aren't automatically requesting review from that team. What's likely misconfigured?

IntermediateGitHub6 min

A team wants to auto-merge every Dependabot PR that passes CI, to reduce the toil of manually reviewing hundreds of dependency bumps. What's the actual risk, and how would you design this safely?

AdvancedGitHubDevSecOps8 min

A security review finds a contractor has write access to a sensitive repository, but nobody remembers explicitly granting it. How did this happen, and how do you audit for it going forward?

IntermediateGitHub6 min

Should you publish your container images to GitHub Container Registry (part of GitHub Packages) or a dedicated external registry like ECR or Docker Hub? What actually drives that decision?

IntermediateGitHubDocker6 min

A service accepts GitHub webhook payloads and triggers a deployment based on push events, but doesn't verify where the request actually came from. What's the risk, and how do you fix it?

IntermediateGitHub6 min

A teammate used 'cache' to pass compiled build output from the build job to the deploy job, and it intermittently fails to find the files. What did they get wrong?

IntermediateGitLab CI/CD6 min

You have a monorepo where a single commit might touch 1 service or 15. How would you use GitLab's dynamic child pipelines so you only run CI for the services that actually changed?

AdvancedGitLab CI/CD8 min

A shared library lives in its own GitLab project, consumed by 5 downstream application projects. How would you trigger those downstream pipelines automatically when the library changes?

IntermediateGitLab CI/CD6 min

Your GitLab pipeline runs 6 stages sequentially, but half your jobs don't actually depend on each other. How would you use 'needs' to speed this up?

IntermediateGitLab CI/CD6 min

How do you make sure a production deployment token stored as a CI/CD variable can only ever be used by pipelines running against your main branch, not a random feature branch?

IntermediateGitLab CI/CD6 min

What's the difference between a branch pipeline and a merge request pipeline in GitLab CI, and why does it matter which one actually runs for a given push?

IntermediateGitLab CI/CD7 min

What debugging challenge does a GitLab merged results pipeline introduce that a plain branch pipeline doesn't, when a job fails?

IntermediateGitLab CI/CD6 min

How would you write .gitlab-ci.yml rules to prevent duplicate pipelines from firing for both a branch push and its merge request?

IntermediateGitLab CI/CD6 min

How does GitLab's pipeline trigger distinction compare to GitHub Actions' push vs pull_request trigger?

IntermediateGitLab CI/CDGitHub Actions6 min