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.

HardTechnical
90 practiced

Compare implementing complex lifecycle logic via a custom Kubernetes operator (controller + CRD) versus using GitOps patterns and existing controllers. For what classes of problems does authoring an operator make sense? Discuss development/testing overhead, operational burden, versioning, and how to handle CRD migrations safely.

MediumTechnical
88 practiced

Describe RBAC best practices when granting Kubernetes permissions to GitOps controllers (e.g., Argo CD, Flux). Explain how to minimize blast radius via namespacing, Argo CD Projects, scoped service accounts, and integration with an external identity provider (SSO). Include how to handle cluster-scoped resources when necessary.

EasyTechnical
86 practiced

High-level: what approaches do you recommend for handling secrets and sensitive data when storing infrastructure code in Git? Compare at least three options (e.g., cloud secret manager, encrypted files with SOPS/git-crypt, committing to Git with vault references) and explain trade-offs in security, auditability, and developer ergonomics.

HardSystem Design
69 practiced

Design an infrastructure codebase to support multiple tenants (teams or customers) that require isolation and shared services. Discuss repository layout, use of modules, parameterization, environment management, access controls, onboarding flow for new tenants, and how to use Git constructs (branches, repos, codeowners) to enforce tenancy boundaries.

HardTechnical
74 practiced

Discuss the trade-offs between using immutable image tags (digests) versus mutable tags (like 'latest' or 'v1') in a GitOps workflow. Explain how immutable tagging affects reconciliation, security (CVE remediation), reproducibility, and developer iteration. Propose a recommended tagging policy for production and for developer environments.

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.