Skip to content
Tech Interview Prep
Technical interview guide

Configuration Management

Keeping infrastructure and application configuration consistent, versioned, and reproducible across environments.

Minutes to read
4
Practice MCQs
25
Interview Q&A
25
Edition
v5
Editorial status
Reviewed

Scope: Ansible Core, Puppet Core, Chef Infra Client, Salt, Kubernetes, NIST SP 800-128, and CIS Controls guidance current 2026-08-31.

Overview

Curated: · Written: · Reviewed:

Configuration Management

In one line

Keeping infrastructure and application configuration consistent, versioned and reproducible: a reviewed desired state, a mechanism that converges reality to it, and a way to see when it cannot. Reach for it when the same settings must hold across many hosts or environments and the risk is drift or an unreviewed change.

Key definitions

  • Desired state: the reviewed, versioned description of how a thing should be.
  • Convergence: the provider compares observed state with declared state and applies only the difference.
  • Idempotency: a run with no input change makes no change. It is a property of the resource implementation and environment, not of the tool.
  • Drift: a difference between authorized intended state and observed relevant state. An approved dev/prod difference is not drift.
  • Ownership: which actor may write a given attribute. Two writers on one attribute will fight.
  • Reload vs restart: a reload re-reads config in place; a restart drops in-flight work.

How it works

  1. Represent intended state as reviewed artifacts in version control; promote by reference, not by per-environment branches.
  2. Validate schema, allowed values, cross-field rules and rendered output before any apply.
  3. Converge each resource. It reports changed only when it actually acted, so a re-run of unchanged input is a no-op.
  4. Verify service behaviour, not the exit code. Notify dependents only on real change, and coalesce notifications into one reload.
  5. Detect divergence by scheduled audit or continuous reconciliation, classify it, then remediate or reconcile back to source.
Authorized or benign Unauthorized or emergency Reviewed desired state in Git Validate and render Converge: apply the difference Verify service behaviour Drift detected? Record and accept Classify, keep evidence, reconcile into Git

When to use and when not to

FactorPush (Ansible over SSH or WinRM)Pull agent (Chef, Puppet, Salt)
BootstrappingReachable credentials onlyAgent install and upgrade across the fleet
Network reachControl node must reach every target each runHosts fetch from the server, so NAT is fine
Convergence cadenceWhenever you run itFixed schedule, for example every 30 minutes
Disconnected hostsFall behind until reachableConverge on next successful check-in
Lifecycle riskFew moving parts on targetsAgent becomes a foothold and a version to manage

Do not use CM to create cloud resources. Terraform or the cloud API owns lifecycle (database instance, subnet, managed service); CM configures what runs on top. Decide by fleet size, network topology and how fast an emergency change must reach every host.

Traps interviewers probe

  1. Calling a command or shell task idempotent. Fix: add creates or removes guards, or a durable marker tied to the desired version, then verify the resulting state.
  2. Stamping non-behavioural content into a hashed artifact, so every build changes the hash. Example: a generated build-info.json inside a Lambda zip changes source_code_hash on every merge. Fix: hash only the inputs that define behaviour and keep build metadata out of the hashed artifact.
  3. Two controllers writing one field. Example: an HPA scaling replicas while a GitOps reconciler resets replicas to the manifest value every 30 seconds. Fix: give each field one owner; remove the field from the manifest the other controller manages, or configure the reconciler to ignore it.
  4. Trusting a successful run. A health check that registers 500 without failing the play, or a pipeline without pipefail that reports exit 0 on a truncated dump. Fix: fail on the status you need, set pipefail, and verify the end state.
  5. Silent defaults and reloads. A missing variable falls back to a built-in default, and a value that passes the schema (max_conns 0) can still break the daemon. Fix: require values that matter, validate semantics the schema misses, and gate reloads on that check. Note that a subPath ConfigMap mount never receives updates, so the pod must restart to see a change.

Interview tips

Open by naming the intended state, how it converges and how you detect divergence, in one sentence.

Follow-ups to expect:

  • Re-run this playbook twice. Name which resources report changed on the second run and which cannot be re-checked, and the guard that fixes it.
  • An operator hand-edited a prod file during an incident. Classify the drift, preserve the evidence, and reconcile the mitigation into review if it was correct.
  • Where do secrets live? Trace store to process environment, who can decrypt, and how rotation reaches the workload. Base64 is encoding, not encryption.
  • Roll back the last change. Ask about reversibility first; prefer forward repair when a schema, password or certificate change cannot be undone.
  • How do you know the fleet is compliant? Count only reports fresher than the check-in interval, and sample independently, because a dead agent looks healthy in its own dashboard.

30-second outline:

  • Intended state lives in reviewed Git and is promoted by reference.
  • Each resource converges to declared state; unchanged input reports no change.
  • Imperative steps get guards and a post-check on behaviour.
  • Drift is sampled independently, classified, and reconciled into source rather than blindly overwritten.
  • Rollout runs in cohorts across failure domains, with a rollback chosen by change reversibility.

Feedback on this overview

Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.