DevOps Engineer interview question · Most asked
Design an end-to-end CI/CD and GitOps setup for 50 microservices, with testing, security scanning, artifact management and production deployment.
Design Asked in DevOps Engineer · Site Reliability Engineer (SRE) interviews
Summary
Each service's CI builds once per commit: test, scan, build an image tagged with the commit SHA, sign it, attach an SBOM and push it to a registry. CD is GitOps: a separate config repository (Helm or Kustomize per environment) records which image runs where, and Argo CD or Flux syncs clusters to it. Promotion is a pull request that changes the image tag for the next environment, with progressive delivery and automated rollback in production.
Longer Answer
CI (per service, from a shared reusable pipeline)
- Lint, unit tests, SAST and dependency scanning on every pull request; required checks before merge.
- On merge: build the image once, scan it (Trivy/Grype), generate an SBOM, sign it (cosign), push to the registry (ECR, GHCR, Artifactory) with an immutable SHA tag.
- Contract and integration tests against ephemeral environments where they add value.
CD (GitOps)
- Environment repository with
dev,staging,prodoverlays; Argo CD ApplicationSets generate one app per service per cluster. - Dev updates automatically (image updater or a CI commit); staging and prod via pull requests, with approvals and
policy checks (Kyverno/OPA: signed images only, no
latest, resource limits required). - Argo Rollouts or Flagger canaries with automated analysis against error rate and latency; automatic rollback.
Platform concerns
- Golden templates so 50 teams don't each invent pipelines; versioned and owned by a platform team.
- Secrets via External Secrets Operator from a vault, not in Git.
- Observability: deploy markers, DORA metrics, per-service SLOs.
- Scale: monorepo or polyrepo both work; in a monorepo, build only changed services.
Key Points
- Build once, scan, sign, SBOM, immutable tags.
- GitOps repo is the source of truth for what runs where.
- Promotion by pull request; policy checks at admission.
- Canaries with automatic analysis and rollback.
- Shared templates so every team gets the controls.
Explanation
What interviewers look for
A coherent design that separates CI from CD, covers supply-chain security and promotion, and scales to many teams through standard templates.
More DevOps Engineer questions
- Every deployment produces a burst of 502s. What do you check?
- After a release, checkout becomes slow. How do you use traces, JVM metrics, connection pool metrics and database monitoring to find the cause?
- Pods keep restarting with OOMKilled under load. How do you investigate and fix it?
- What happens when you type a URL into a browser and press Enter?
- Your ecommerce site runs 30 microservices on Kubernetes. After a deployment, customers start getting HTTP 503 errors. How do you investigate and resolve it?
- Your Kubernetes-based ecommerce site goes down during peak traffic. Walk through your first 15 minutes.
- A rollback after a release made the outage worse because the database had already been migrated. How do you design releases so rollbacks are always safe?
- How do you implement automated rollback in a deployment pipeline?