Skip to content
$ lynuxpro

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 16–20 of 20 questions

Learn GitLab CI/CD →
16.How would you make sure every project in the company runs secret detection, even if a team removes it?Senior

Use security policies from a security policy project linked to the top group. A scan execution policy forces secret detection in every pipeline, and projects can't turn it off. A merge request approval policy blocks merges with new critical or high findings until the security team approves. Pipeline execution policies can add other required jobs. Scope policies to compliance frameworks where needed.

17.How do you protect production in GitLab end to end?Senior

Several layers: protected main and tags; merge checks (pipeline must pass, threads resolved) and approval rules with CODEOWNERS; protected variables for production secrets; protected runners or a protected-branch-only Kubernetes agent; protected environments with deployment approvals; resource_group for one deploy at a time; and audit events streamed to a SIEM.

18.What must a self-managed GitLab backup include, and how do you restore it?Senior

gitlab-backup create saves the database, repositories, uploads, artifacts, packages and more. It does not include /etc/gitlab/gitlab.rb and gitlab-secrets.json; copy those separately and keep them safe, because without gitlab-secrets.json encrypted data like CI/CD variables and runner tokens can't be read. To restore: same GitLab version, stop puma and sidekiq, gitlab-backup restore BACKUP=ID, put back the config files, reconfigure, restart, and run gitlab-rake gitlab:check. Practise restores regularly.

19.How do you upgrade a self-managed GitLab safely?Senior

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.

20.What is the difference between HA and Geo in GitLab?Senior

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.