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.

EasyTechnical
74 practiced

Compare Argo CD and Flux as GitOps controllers. Focus on architecture (pull vs push, UI presence), reconciliation model, multi-cluster support, extensibility, and example use-cases where one might be preferred over the other.

EasyTechnical
87 practiced

Define infrastructure-as-code (IaC) drift. Explain how you would detect drift across multiple environments at scale, and describe remediation approaches (reapply, import, destroy/recreate) and guardrails you would put in place to prevent accidental manual changes.

HardTechnical
80 practiced

Compare versioning strategies for configuration and artifact management across an enterprise: semantic versioning, timestamped builds, git-commit-hash references, and artifact-repository versions. Recommend a strategy that balances traceability, ability to rollback, and support for reproducible deployments.

MediumTechnical
109 practiced

Explain the concepts of convergence and eventual consistency in configuration management. Provide a concrete example of a converge-loop (reconciliation) system and describe failure modes where convergence may never be achieved. Suggest mitigations for those failure modes.

HardTechnical
90 practiced

Design a delegated self-service model for teams to request and approve infrastructure changes while maintaining central controls. Explain repository permissions, approval flows, policy-as-code enforcement, sandbox environments, and how audit trails and rollback capabilities are preserved.

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.