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.

MediumTechnical
65 practiced

Explain what GitOps is and outline an implementation plan using ArgoCD or Flux for a company adopting GitOps for Kubernetes. Cover repo layout (app vs infra), promotion strategy, handling secrets, drift detection, and rollback mechanisms.

MediumTechnical
71 practiced

Explain remote Terraform state backends and state locking mechanisms. Discuss best practices for state storage (encryption at rest), state locking (DynamoDB, etc.), access controls, and handling secrets stored in state. Provide an example backend choice for a large organization that spans multiple regions and teams.

HardSystem Design
89 practiced

Design a GitOps-based release orchestration platform for 100 microservices spanning multiple business units. Cover repository layout and ownership, reconcile frequency, RBAC and delegated permissions, approval workflows, and technical controls to enforce system-wide invariants such as API contracts or shared schema compatibility.

HardSystem Design
84 practiced

You're proposing documentation automation that pulls live inventory from cloud APIs and compares it to declared IaC state. Describe an approach to detect drift, generate a prioritized report of critical drifts, and automatically open PRs or tickets for reconciliation. Include rate-limiting, access controls, and false-positive mitigation.

MediumSystem Design
91 practiced

Explain how GitOps applies to managing infrastructure. Design a GitOps workflow for an SRE team using a declarative controller (for example Flux or ArgoCD) that ensures environments are reconciled from Git. Include how you handle environment overlays, secret injection, drift reconciliation, and emergency out-of-band changes.

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.