InterviewStack.io LogoInterviewStack.io

Infrastructure as Code and GitOps Questions

Defining and managing infrastructure and delivery state declaratively: provisioning as code (Terraform, CloudFormation, Pulumi, Ansible, Puppet), configuration management, idempotency, drift detection and remediation, and version control for infrastructure definitions, extended by GitOps where git is the source of truth for deployment and infrastructure state. Covers keeping environments consistent, treating config as a first-class versioned artifact, pull-based deployment and continuous reconciliation toward the committed state (ArgoCD, Flux, and similar controllers), Kubernetes manifest and configuration delivery via git, secrets handling for IaC and GitOps pipelines, policy-as-code guardrails (OPA, Sentinel), Terraform state management and locking, and auditable change through version control: branching strategy, pull request review, commit conventions, and code review policy for infrastructure code. Distinct from the CI/CD pipeline design topic, which owns generic pipeline structure and platform-scale release orchestration (build, test, artifact publishing, runner mechanics) and the architectural choice between push-based CI/CD and pull-based GitOps, even when the payload is infrastructure code. Distinct from the safe deployment and rollback strategies topic, which owns deployment-strategy mechanics: canary and blue-green traffic shifting, automated rollback triggered by metrics or SLOs, feature-flag progressive delivery, Kubernetes rollout mechanics (maxSurge, maxUnavailable, health-check gating), and database or schema migration safety as it gates a release, even when the delivery mechanism is GitOps. Distinct from the automation and scripting topic, which owns operational-scripting disciplines (retry and backoff logic, CLI tool design, generic file, checksum, or diff utilities) when the task is not specifically about declarative infrastructure or configuration state. This topic keeps the GitOps reconciliation loop itself, drift detection and remediation, and IaC state and module lifecycle management regardless of which adjacent discipline a question also touches.

MediumSystem Design
70 practiced

Design a Git workflow for a multi-team SRE organization that manages multiple services' infrastructure in a shared repository. Describe branch strategy, pull request flow, code ownership rules, CODEOWNERS, CI gating, environment promotion (dev -> staging -> prod), and branch protection rules with examples of branch name patterns.

EasyTechnical
68 practiced

Compare Helm and Kustomize for managing Kubernetes manifests in a GitOps workflow. For each tool describe how parameterization and environment overlays are implemented, pros and cons (templating, repeatability, security), and provide a short recommendation for a multi-team organization.

HardSystem Design
63 practiced

Design a scalable GitOps pipeline for managing infrastructure across multiple cloud accounts and clusters supporting dev/staging/prod. Requirements:

  • Declarative manifests live in Git
  • Automated reconciliation with drift detection
  • Role-based access controls per environment
  • Approval gates for production
  • Secure handling of secrets
    Describe repository layout, automation components (controllers, CI), workflows for PRs and merges, and rollback procedures for failed reconciliations.
MediumSystem Design
64 practiced

Design a secure, versioned configuration backup and storage solution for sensitive system configs. Requirements: immutable historical versions, encrypted at rest with key rotation, access logging for audits, retention policies, and fast retrieval for rollback. Describe storage choices, access control, and how to integrate with CI/CD for automatic backups pre-deployment.

HardTechnical
75 practiced

Implement (or outline implementation details for) a three-way merge algorithm for structured YAML configuration: base, local, and remote. The algorithm should detect conflicts and produce a merged result when non-conflicting. Explain how you handle list merging and when to escalate to manual resolution.

Unlock Full Question Bank

Get access to all Infrastructure as Code and GitOps interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.