Interview Q&A · questions with model answers

CI/CD & Deployment Interview Questions

Part of the study plan for: DevOps Engineer · Site Reliability Engineer (SRE) · QA Engineer / SDET

Ordered by how often they're asked. Most-asked answers are free to read in full; members see every answer and can rate their confidence on each.

  1. Most asked What stages does a typical CI/CD pipeline contain?

    Checkout → install dependencies (cached) → lint and type-check → unit tests → build artifact/image → integration tests → security scans (SAST, dependencies, image) → publish artifact → deploy to…

  2. Most asked What are best practices for writing Dockerfiles?

    Use small, pinned base images, multi-stage builds to keep build tools out of the runtime image, order layers so dependencies are cached before source code, run as a non-root user, add a…

  3. Most asked What is shift-left testing, and what security scanning belongs in a CI pipeline?

    Shift-left means moving testing and security checks earlier in the development lifecycle — into the IDE, pre-commit hooks and CI pipeline rather than waiting for a manual review or a production…

  4. Most asked What is pipeline as code and why does it matter?

    Pipeline as code means defining your CI/CD pipeline in a version-controlled file (Jenkinsfile, .github/workflows/*.yml, .gitlab-ci.yml) rather than configuring it through a web UI. Changes to the…

  5. What are the core Kubernetes objects a web service needs?

    A Deployment (pods with replicas and rolling updates), a Service (stable networking to pods), an Ingress or Gateway (external HTTP routing and TLS), ConfigMaps and Secrets (configuration), probes…

  6. What is graceful shutdown and why does it matter for deployments?

    On SIGTERM, a service stops accepting new requests (fails readiness), finishes in-flight requests and jobs within a grace period, closes connections, and exits. Without it, deploys and scale-downs…

  7. What is trunk-based development?

    Developers integrate small changes into the main branch at least daily, using short-lived branches (or none) and feature flags for unfinished work, instead of long-lived feature branches. It…

  8. What is infrastructure as code and why use it?

    Infrastructure as code defines servers, networks, databases and permissions in versioned files (Terraform/OpenTofu, Pulumi, CloudFormation, CDK) applied by tools, making environments reproducible,…

  9. What is GitOps?

    GitOps uses a Git repository as the source of truth for desired deployment state; an in-cluster agent (Argo CD, Flux) continuously reconciles the cluster to match Git. Deploying means merging a…

  10. What are DORA metrics?

    DORA metrics measure software delivery performance: deployment frequency, lead time for changes, change failure rate, and time to restore service (with deployment rework rate added in newer…

  11. What is semantic versioning?

    Semantic versioning (MAJOR.MINOR.PATCH) signals compatibility: MAJOR for breaking changes, MINOR for backward-compatible features, PATCH for backward-compatible fixes. It's essential for libraries…

  12. What should happen when a deployment causes an incident?

    Mitigate first (roll back, disable the feature flag, or scale), communicate status, then investigate. Afterwards hold a blameless postmortem that records timeline, root causes and contributing…

  13. What is progressive delivery?

    Progressive delivery extends continuous delivery with controlled exposure: canaries, percentage rollouts, feature flags, ring deployments (internal → beta → all) and automated analysis that promotes…

Was this page helpful?

Report a mistake