INTERVIEW PREP
Interview questions
570 questions from real DevOps, SRE, platform engineering and MLOps interviews, with the answer an interviewer wants to hear. Try answering out loud first, then open the model answer.
Showing 166–180 of 475 questions
166.How do you upgrade a self-managed GitLab safely?SeniorGitLab CI/CD
Read the release notes, take a backup and copy the config files, and follow the upgrade path with its required stops (x.2, x.5, x.8, x.11), waiting for background migrations to finish between steps. Test on a staging instance first. Multi-node setups can do zero-downtime upgrades node by node. Afterwards, run gitlab:check. You can't downgrade a package; going back means restoring a backup.
167.What is the difference between HA and Geo in GitLab?SeniorGitLab CI/CD
HA runs several copies of each part in one site (several Rails nodes behind a load balancer, PostgreSQL with Patroni, Redis Sentinel, Gitaly Cluster, object storage), so one server can fail without downtime. Geo keeps a live, read-only copy of the whole site in another region, for disaster recovery and faster clones for far-away teams. If the primary site is lost, you promote the secondary and switch DNS. You still need backups, because both copy mistakes too.
168.What is the difference between Git and GitHub?BeginnerGitHub & GitHub Actions
Git is the tool on your computer that tracks versions of files. GitHub is a website that stores Git repositories online and adds sharing, pull requests, issues and automation.
169.What is a pull request?BeginnerGitHub & GitHub Actions
A request to merge your branch into another branch, usually main. It lets teammates review the changes and lets automatic checks run before the merge.
170.What are the main parts of a GitHub Actions workflow?BeginnerGitHub & GitHub Actions
An event that starts it, jobs that run on runners, and steps inside each job. A step either runs a command or uses a ready-made action.
171.Where do workflow files live?BeginnerGitHub & GitHub Actions
In the .github/workflows folder of the repo, as YAML files.
172.What is a runner?BeginnerGitHub & GitHub Actions
The machine that runs a job. GitHub-hosted runners are fresh virtual machines for each job. Self-hosted runners are machines you manage.
173.How do you make jobs run in order?MidGitHub & GitHub Actions
Use needs. A job with needs waits for the listed jobs to pass. Without it, jobs run in parallel.
174.How do you pass data between jobs?MidGitHub & GitHub Actions
Declare outputs on the producing job, write them to $GITHUB_OUTPUT in a step, and read them in the next job with needs.<job>.outputs.<name>. For files, use artifacts.
175.What is the difference between secrets and variables?MidGitHub & GitHub Actions
Secrets hold private values, are masked in logs and cannot be read back. Variables hold ordinary settings and are visible.
176.What does branch protection do and why does it matter?MidGitHub & GitHub Actions
It sets rules for important branches: pull requests, approvals, passing checks and no force pushes. It keeps main safe and enforces your review process.
177.How does caching speed up a workflow?MidGitHub & GitHub Actions
Dependencies are saved under a key, usually a hash of the lock file. When the key matches, they are restored instead of downloaded again.
178.When do you use a matrix?MidGitHub & GitHub Actions
When the same job must run with several settings, like Node versions or operating systems. It creates one job per combination, running in parallel.
179.What is the difference between artifacts and cache?MidGitHub & GitHub Actions
A cache speeds up repeated downloads and may be evicted. Artifacts are files from a run that you pass to other jobs or keep for download.
180.Reusable workflow or composite action?SeniorGitHub & GitHub Actions
A reusable workflow shares whole jobs and is called at job level. A composite action shares a few steps and is used like a single step inside a job.