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.
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.
Sample Answer
Direct answer
GitOps is an operating model where Git holds the DECLARED DESIRED STATE of a system (Kubernetes manifests, in this case) and an in-cluster controller (Argo CD or Flux) continuously reconciles the live cluster toward whatever is committed, so every change to the running system happens BY committing to Git first, never by an operator applying something directly. An implementation plan for a company adopting this needs six concrete decisions made up front: repository layout, promotion strategy, secrets handling, drift detection policy, rollback mechanics, and which controller to run, each of which shapes how the team actually works day to day, not just which tool sits in the diagram.
Structured elaboration
What GitOps is, precisely. Three properties together define it: (1) the ENTIRE desired state is expressed declaratively and lives in Git, (2) an automated controller, not a human running kubectl or a CI job pushing changes, PULLS from Git and applies it, and (3) the controller continuously RECONCILES, correcting any divergence between live and declared state, not just applying once at deploy time. Missing any one of the three is a related but different pattern (a CI pipeline that runs kubectl apply on merge is Git-triggered but PUSH-based, not GitOps in the pull-based, continuously-reconciling sense).
Repo layout (app vs infra). A common, workable split: an APPLICATION repo per service, owned by the team that builds it, containing the service's own Dockerfile/build config and a BASE Kubernetes manifest (or Helm chart) with no environment-specific values; and a separate INFRASTRUCTURE (or "config") repo, owned by the platform team, containing the per-environment OVERLAYS (Kustomize overlays or per-environment values files) that the GitOps controller actually watches and syncs from. This separation means an application team can iterate on their own manifests without needing infra-repo write access for every change, while environment promotion (below) becomes a change to the infra repo alone, not a rebuild of the application.
Promotion strategy. Promotion means moving a specific, already-built artifact (an image digest) from one environment's declared state to the next, dev to staging to production, by committing that digest into the NEXT environment's overlay in the infra repo. A common pattern: CI automatically opens a PR bumping the dev overlay on every successful build; promotion to staging and production are each their own PR (often automated with a required approval gate for production specifically), so each promotion step is its own reviewed, auditable Git event rather than one build automatically cascading through every environment unchecked.
Handling secrets. Secret VALUES never live in the plain manifests the controller applies. Use one of the established patterns: Sealed-Secrets or SOPS (an encrypted blob committed to Git, decrypted only in-cluster or by the controller), or an External Secrets Operator pulling live from a dedicated secrets store (Vault or a cloud key management service) and syncing into native Kubernetes Secrets. For a company just adopting GitOps, External Secrets Operator is often the simpler operational starting point (no per-secret encryption workflow for developers to learn), while Sealed-Secrets/SOPS avoid taking on a new runtime dependency; the choice should follow the team's existing secrets infrastructure, not be picked in isolation.
Drift detection. The controller's reconciliation loop detects drift automatically (comparing live vs. Git-declared state on every cycle); the IMPLEMENTATION decision is the response policy, auto-heal (revert drift automatically) for steady-state config, or alert-and-require-manual-sync for higher-risk applications where an unreviewed automatic revert could make an active incident worse. A newly adopting team should default to alert-and-manual-sync broadly at first, and graduate specific, well-understood applications to auto-heal as confidence builds, rather than enabling aggressive auto-heal everywhere from day one.
Rollback mechanisms. Because the desired state is just a Git history, a rollback is conceptually reverting the relevant commit (the overlay change that introduced the bad state) and letting the controller reconcile the cluster back to the prior state automatically; no separate rollback tooling is required beyond normal Git operations, though the controller's OWN rollback/history UI (Argo CD's rollback-to-a-prior-sync view, for instance) is often faster in practice than manually identifying and reverting the right commit under incident pressure.
Trade-offs and pitfalls
- Common mistake: treating "we run Argo CD" as equivalent to "we do GitOps." If the team still routinely applies emergency changes directly to the cluster and later reconciles Git to match afterward, the actual source of truth in practice is the CLUSTER, not Git, even though a GitOps controller is technically running; the tooling alone does not create the discipline.
- Splitting app and infra repos too early, before there is more than one or two services, adds coordination overhead with no real benefit yet. For a small initial adoption, a single repo with clearly separated app and overlay directories is often the right starting point, splitting into separate repos as the number of teams and services genuinely grows past what one repo can coordinate cleanly.
- A company new to GitOps often underestimates the secrets-handling decision's operational weight. Whichever pattern is chosen, someone has to own key rotation, access review, and the promotion workflow for secrets specifically (a secret often needs different values per environment, unlike an image digest that promotes unchanged); treating secrets as an afterthought after the manifest-promotion pipeline is designed tends to produce a bolted-on, inconsistent secrets workflow.
- Rollback via Git revert only fully restores the prior state if image references were immutable (digests, not mutable tags) at the time of the original commit, a dependency worth calling out explicitly rather than assuming, since Git revert alone does not guarantee it.
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.
Sample Answer
Direct answer
A remote Terraform state backend stores the state file OUTSIDE the local filesystem (object storage like S3, Azure Blob, or GCS, or Terraform Cloud's own managed state) so multiple engineers and CI jobs share one authoritative copy rather than each holding a local file that can silently diverge; state LOCKING (typically a separate mechanism, such as a DynamoDB table, that coordinates with the object-storage backend) prevents two concurrent apply operations from racing and corrupting that shared state. Both together are the minimum bar for ANY team of more than one person running Terraform against the same infrastructure.
Structured elaboration
Why remote state is necessary at all. A local state file is a single point of failure (lost with the laptop it lived on) and a single point of DIVERGENCE (two engineers' local copies drift the moment either one applies without the other pulling first); remote state fixes both by making one location authoritative and fetchable by everyone, including CI runners that have no persistent local disk between runs.
Encryption at rest. The backend's own storage-layer encryption (S3 server-side encryption with a customer-managed key, for example) protects the state file at rest, which matters specifically because Terraform state commonly contains SENSITIVE VALUES in plaintext (database passwords set via a resource argument, generated certificates, sometimes even provider credentials passed through as resource attributes); encryption at rest is a baseline control, not a substitute for also minimizing what sensitive data ends up in state in the first place.
State locking mechanisms. A lock is acquired before plan/apply begins and released after it completes (or on a timeout if the process dies uncleanly); DynamoDB-backed locking (historically the standard pattern for an S3 backend) uses a single table row per state file as the lock record, and a SECOND concurrent apply attempting to acquire the same lock blocks or fails immediately rather than racing the first one's writes. Without locking, two simultaneous applies can each read the same starting state, compute conflicting plans, and the SECOND one to write silently clobbers the first one's recorded changes even though both sets of real infrastructure changes actually happened, a state file that no longer matches reality in either direction.
Access controls. The backend's own IAM (identity and access management) policy should scope WHO can read and write each state file independently of who can run terraform apply against the corresponding infrastructure; state read access alone is a meaningful privilege (state frequently contains secrets, as above), so a CI runner or engineer needing to only READ outputs for a downstream reference should not automatically also have WRITE access to the state file itself.
Handling secrets in state. Because Terraform state routinely captures resource arguments and computed attributes verbatim, including ones a provider marks sensitive at the SCHEMA level but which still land in the raw state file, treat the state file itself as a secret-bearing artifact requiring the same access discipline as a credentials store, not merely as "infrastructure bookkeeping." Where possible, avoid resources that require Terraform to generate or hold a long-lived secret directly (prefer resources that reference an externally-managed secret by ARN or path over ones where Terraform itself sets the secret value).
Worked example
Backend choice for a large organization spanning multiple regions and teams: per-team, per-environment state files (NOT one giant shared state), each in its own S3 key under a consistent naming convention (s3://org-tfstate/<team>/<environment>/<component>/terraform.tfstate), server-side encryption enabled on the bucket with a KMS (key management service) customer-managed key scoped so only the relevant team's CI role and a break-glass admin role can decrypt, DynamoDB table for locking with one row per state key, and bucket-policy-level access control restricting each team's CI role to read/write only under its own prefix. This gives every team an independently locked, independently access-controlled state file while keeping operational overhead centralized (one bucket, one lock table, one encryption key management process) rather than each team standing up its own backend infrastructure from scratch.
Trade-offs and pitfalls
- Common mistake: treating a single monolithic state file as simpler to manage, when it is actually a bigger operational and blast-radius risk as a team grows. Every
applyagainst a shared monolithic state locks out every OTHER team's applies for its duration, and a mistake in one team's change carries the same state-corruption risk for everyone else's resources tracked in that same file; splitting state per team/environment/component trades a bit of cross-references complexity for real isolation. - DynamoDB-based locking is a widely used PATTERN for S3 backends specifically, not a universal Terraform requirement, some backends (Terraform Cloud's managed state, some newer S3-native locking mechanisms) provide locking built in without a separate lock table; the underlying REQUIREMENT (mutual exclusion during writes) is universal, the specific mechanism is backend-dependent.
- Encrypting the state file at rest does nothing to protect it from someone with legitimate READ access to the backend. State access control (who can read the bucket/key) is the control that actually limits secret exposure day to day; encryption at rest primarily protects against a different threat (the underlying storage medium itself being compromised or exfiltrated), and conflating the two leaves the more common risk (an over-broadly-granted read role) unaddressed.
- Common mistake: assuming a resource marked "sensitive" in a Terraform provider schema means the value never appears anywhere in plaintext. The
sensitiveattribute only suppresses the value from CLI OUTPUT and logs; it is still stored in the raw state file exactly as before, sensitive-attribute masking is a display-layer control, not a state-file-encryption or access-control substitute.
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.
Sample Answer
Direct answer
At 100-microservice, multi-business-unit scale, the platform needs a genuinely DIFFERENT enforcement mechanism than smaller-scale GitOps designs: SYSTEM-WIDE INVARIANTS (API contract compatibility, shared schema compatibility) cannot be checked by any single service's own reconciliation loop in isolation, since a contract violation is, by definition, a relationship between TWO OR MORE services, not a property of one service's manifest alone. This needs a dedicated CROSS-SERVICE validation layer sitting ALONGSIDE the ordinary per-service GitOps reconciliation, not a replacement for it.
Structured elaboration
Repository layout and ownership. Business-unit-scoped top-level directories, each containing that unit's OWN services, with CODEOWNERS delegating approval authority per business unit for their own services, while a SEPARATE, platform-owned directory holds shared CONTRACT DEFINITIONS (API schemas, shared data-schema definitions) that no individual business unit can unilaterally change without cross-unit review, since a contract is inherently shared, not owned by any one consumer.
Reconcile frequency. Per-service reconciliation follows the usual pattern (event-driven plus periodic backstop, per-service); the CROSS-SERVICE invariant check runs on a DIFFERENT trigger entirely, whenever a contract definition itself changes, OR whenever any service's manifest changes in a way that touches a contract-relevant field, evaluating the FULL graph of affected consumers, not just the one service being changed.
RBAC and delegated permissions. Per-service RBAC (role-based access control) follows the usual per-tenant scoping; contract definitions get their OWN, stricter RBAC (requiring approval from a representative of every business unit with a service DEPENDING on that contract, not just the unit proposing the change), since a contract change's blast radius spans ownership boundaries in a way an individual service's own manifest change does not.
Approval workflows. A service-local change (most changes) follows the standard per-service PR flow. A CONTRACT change triggers an ELEVATED workflow: automatically identifying every consuming service (via a dependency graph, maintained explicitly rather than inferred, since inferring API dependencies reliably at this scale is unreliable) and requiring explicit acknowledgment or sign-off from each consumer's owning team before the contract change can merge, turning a cross-cutting risk into a structurally-enforced, visible coordination point rather than something that could otherwise ship silently and break a consumer nobody thought to check with.
Technical controls enforcing system-wide invariants. A dedicated VALIDATION SERVICE (or CI job with visibility across the whole repo, not scoped to one service's path) that, on any contract-relevant change, checks proposed API/schema changes against every registered consumer's own declared expectations (a contract-testing approach, consumer-driven contract tests, or a schema-compatibility checker comparing old-vs-new schema for breaking changes per field), FAILING the check if a breaking change is proposed with no corresponding, coordinated update to affected consumers already prepared.
Worked example
A concrete flow for a shared "order" schema change affecting 12 consuming services across 3 business units:
- A PR proposes adding a new REQUIRED field to the shared
orderschema in the platform-owned contract directory. - The cross-service validation job identifies, via the maintained dependency graph, all 12 services declaring a dependency on this schema.
- Schema-compatibility checking flags this as a BREAKING change (a new required field breaks any consumer not yet prepared to supply it); the check fails automatically, regardless of who is proposing the change.
- The PR is revised to add the field as OPTIONAL with a default (a backward-compatible pattern), or, if it must be required, the PR is blocked until paired PRs updating all 12 consumers are ready to merge together (a coordinated, multi-PR rollout).
- Once compatible (or once all consumer updates are coordinated), each of the 3 business units' representatives sign off per the elevated approval workflow before merge.
Trade-offs and pitfalls
- Common mistake: relying on informal communication ("post in the team channel before changing a shared schema") instead of a structurally-enforced check. At 100-microservice, multi-business-unit scale, informal coordination reliably breaks down, not every consumer is known to every proposer, and "we forgot to notify that team" becomes a routine, recurring incident cause rather than a rare mistake; the automated dependency-graph-driven check is what makes coordination happen EVERY time, not just when someone remembers to ask.
- The dependency graph itself needs to be MAINTAINED explicitly and kept current, an inferred or stale graph either misses a real consumer (the check silently fails to catch a break) or over-flags (blocking changes on services that no longer actually depend on the contract), both of which erode trust in the automated check over time.
- Elevated, multi-business-unit approval for contract changes is a real, deliberate friction cost, appropriate specifically because contract changes carry genuinely cross-cutting risk, applying this SAME elevated bar to ordinary, service-local changes (which do not touch shared contracts) would be a disproportionate tax on the vast majority of day-to-day changes; keeping the elevated workflow scoped ONLY to contract-relevant changes is what keeps the system usable at scale.
- Schema-compatibility checking catches STRUCTURAL breaking changes (a removed field, a new required field) but not necessarily SEMANTIC ones (a field's meaning subtly changing while its structure stays the same), a real, harder-to-automate gap that the cross-business-unit sign-off step exists partly to catch through human review, not purely through the automated check alone.
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.
Sample Answer
Direct answer
Automating drift reporting on top of basic reconciliation mechanics means adding three things that raw diffing alone does not provide: PRIORITIZATION (not every drift deserves the same attention), an ACTION mechanism (a PR or ticket opened automatically, not just a report sitting in a dashboard nobody checks), and FALSE-POSITIVE MITIGATION (since automatically opening a PR or ticket for every detected difference, including ones that are noise rather than real drift, quickly trains a team to ignore the automation entirely).
Structured elaboration
Detecting drift, building on the underlying comparison. Reuses the same core mechanic as basic drift detection (compare declared IaC state against live cloud-API inventory, per-resource and per-type, with the same rate-limiting and credential-error handling), the NEW work here is everything layered on top of that raw diff.
Generating a prioritized report. Not every drifted field carries the same risk; a prioritization scheme should weigh at minimum: resource CRITICALITY (a tag or classification identifying production-critical versus disposable resources), field SENSITIVITY (a security-relevant field like an ingress rule outranks a purely cosmetic tag), and DRIFT AGE (a newly-detected drift versus one that has persisted across several scan cycles unaddressed, which may indicate either a genuinely low-priority item or a process gap worth surfacing on its own). The report surfaces HIGH-priority items first and explicitly, rather than a flat, unranked list a reader has to triage manually every time.
Automatically opening PRs or tickets for reconciliation. For drift where the DECLARED state is clearly the correct target, auto-open a PR proposing the reconciling change (a terraform apply-equivalent diff, reviewable exactly like any other infra PR); for drift that is ambiguous (unclear which side, live or declared, should win) or where the resource is high-criticality, open a TICKET instead, routing the ambiguous or high-stakes decision to a human rather than presuming an automatic PR is always the safe default action.
Rate-limiting. The same cloud-API rate-limiting and backoff discipline any drift-detection scan needs applies here directly; additionally, rate-limit the OUTPUT side too, capping how many PRs/tickets get auto-opened per scan cycle (even if many resources genuinely drifted at once, opening 200 individual PRs simultaneously overwhelms reviewers more than it helps them; batching related drift into fewer, larger, well-organized PRs/tickets is usually the better output shape).
Access controls. The reporting/PR-opening automation's own credentials need to be READ-ONLY against the cloud APIs (it only needs to observe state, never modify it directly) and WRITE-SCOPED only to the Git repository/ticket system (to open PRs/tickets), never holding infrastructure-modifying credentials itself, the actual infrastructure change happens through the SAME reviewed PR-and-apply pipeline as any other change, this automation's job is detecting and proposing, not applying.
False-positive mitigation. Three concrete techniques: (1) a CONFIRMATION window, require the SAME drift to be detected across two or more CONSECUTIVE scan cycles before opening a PR/ticket, filtering out a purely transient one-off blip (a provider API returning briefly stale data); (2) an explicit IGNORE mechanism for known-acceptable differences (a field that legitimately varies and is not meaningful drift, tracked per-resource, per-field, with a documented reason, not a blanket suppression); (3) DEDUPLICATION against already-open PRs/tickets for the same resource, so a repeated scan cycle does not open a second, redundant PR for drift already being tracked.
Trade-offs and pitfalls
- Common mistake: opening a PR or ticket for every single detected drift immediately on first detection, with no confirmation window. A team that gets flooded with PRs for transient, self-resolving blips quickly learns to ignore or auto-close them without reading, which defeats the automation's purpose entirely and, worse, trains the team to also ignore GENUINE drift alerts once they have learned the automation is noisy.
- Prioritization needs to be based on something OBJECTIVE (a criticality tag, a field-sensitivity classification) rather than the automation's own guess at "importance," which a generic heuristic (like "how many fields changed") tends to get wrong, a single-field change to a security group's ingress rule is far more important than a ten-field change to cosmetic tags, and a naive "more changes = higher priority" heuristic would rank them backwards.
- The read-only/write-scoped credential boundary is what keeps this automation from becoming a SECOND, un-reviewed path that can modify infrastructure, if this automation could ALSO apply the fix it proposes, it would bypass PR-based review entirely; keeping it strictly propose-only, never apply-capable, is a deliberate, important restriction, not an incidental one.
- The ignore mechanism needs its own periodic review, or it accumulates into a growing list of undocumented, unrevisited suppressions, exactly the kind of thing a periodic access-review discipline exists to catch; an ignore-list entry from a year ago may no longer reflect a legitimate exception, and nothing forces it to be re-examined without a deliberate periodic pass.
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.
Sample Answer
Direct answer
Applying GitOps to infrastructure means the same declarative, pull-based, continuously-reconciled model already used for Kubernetes applications extends to the INFRASTRUCTURE that hosts them: the desired cluster and environment configuration lives in Git, and a controller (Flux or Argo CD) reconciles the live environment toward it. For an SRE team, the concrete workflow needs four specific mechanisms layered on top of the base reconciliation loop: environment overlays (so one base configuration serves dev/staging/prod without duplication), secret injection (so sensitive values never live in the plain manifests the controller reads), drift reconciliation (so manual out-of-band changes get corrected or at least surfaced), and an explicit, bounded escape hatch for emergency out-of-band changes (so an incident is never blocked on a slower normal Git flow, without abandoning the audit trail entirely).
Structured elaboration
Environment overlays. A base configuration (common to every environment) plus per-environment overlay directories (Kustomize overlays, or per-environment Helm values) captures what genuinely differs: replica counts, resource limits, feature flags, environment-specific hostnames. The controller in each environment's cluster watches ONLY that environment's rendered overlay path, so a change to the base propagates to every environment through their respective overlays, while an environment-specific tweak stays scoped to that one overlay.
Secret injection. An External Secrets Operator instance per cluster (or Sealed-Secrets/SOPS if the team prefers not to take on a live runtime dependency on an external store) resolves secret REFERENCES declared in the overlay into actual Kubernetes Secret objects at apply time, so the Git-committed manifest never contains a plaintext value, only a pointer to where the real value lives.
Drift reconciliation. The controller's normal reconciliation loop detects and, per application-level policy, either auto-heals or alerts on drift (the concrete mechanism is Argo CD's selfHeal setting); for an SRE team specifically, a sensible default is auto-heal for stateless application config and alert-only for anything touching state or currently under active incident response, since an aggressive auto-revert during an incident can undo a legitimate emergency mitigation before anyone has captured it properly.
Emergency out-of-band changes. The explicit escape hatch: a defined, short-lived path (a break-glass role, or a SyncWindow-style pause on auto-heal for a specific application during a declared incident) that lets an on-call engineer make an immediate live change WITHOUT the reconciler immediately reverting it, paired with a HARD requirement that the change gets captured back into Git within a bounded window afterward (the same day, or before the incident is formally closed), so the exception is temporary and auditable rather than a permanent, undocumented divergence from the declared state.
Worked example
A concrete repo and cluster layout for a three-environment SRE-owned fleet:
infra-repo/
base/
deployment.yaml
service.yaml
externalsecret.yaml # references vault path, no plaintext values
overlays/
dev/kustomization.yaml # low replica count, verbose logging
staging/kustomization.yaml # mirrors prod shape at smaller scale
prod/kustomization.yaml # full replica count, SyncWindows configured
Each environment's Argo CD Application object points at its own overlay path. prod's Application additionally sets syncPolicy.automated.selfHeal: false for the specific service currently under active on-call rotation review, with a documented runbook step: "if you make a live emergency change, re-enable selfHeal only after committing the equivalent change to overlays/prod/, within the same incident."
Trade-offs and pitfalls
- Common mistake: designing the emergency escape hatch as "give the on-call engineer standing bypass access." A standing bypass is a permanent weakening of the model's core guarantee; the escape hatch should be TIME-BOXED and auditable (a break-glass grant that expires, or a per-application, per-incident SyncWindow pause), not a quiet permanent exception that erodes Git-as-source-of-truth for whoever happens to hold it.
- Overlay sprawl is a common failure mode as the number of environments grows. Without a convention for what belongs in the base versus what belongs in each overlay, environments drift apart in ways that are hard to track; a periodic review of overlay diffs (are staging and prod diverging in ways nobody intended) keeps the "one base, thin overlays" property real rather than aspirational.
- Secret injection needs its OWN drift/rotation story, not just an initial setup. A secret rotated in the backend should propagate through the same reconciliation mechanism as any other change; treating secrets as a one-time setup task rather than an ongoing reconciled concern leaves rotation as a manual, easy-to-forget side process.
- The emergency-change reconciliation requirement (captured back into Git within a bounded window) is the step teams most often skip once the immediate incident is resolved. Without an explicit follow-up task tracked as part of incident closure (not just a suggestion in a runbook), the live emergency change quietly becomes permanent, undocumented drift.
Unlock Full Question Bank
Get access to all Infrastructure as Code and GitOps interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.