Skip to content
Tech Interview Prep
Technical interview guide

Configuration Management

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

Read
30 min
Practice MCQs
25
Interview Q&A
25
Edition
v4
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.

Curated: · Written: · Reviewed:

25 questions

MCQ-20A 400-node fleet runs a pull-based configuration agent; each node checks in on its own jittered schedule (mean 30 min, worst case 2 h), and the control plane only publishes the catalog. Which statement about reaching the declared desired state is correct?
MCQ-15A playbook run against Linux hosts includes a copy task that writes /etc/app/config.yml and an apt task that installs nginx. On host A an operator edited the config file by hand after the previous run; this run rewrites it and reports changed=true. On host B the file is byte-identical to the template but was touched, so its mtime is newer; this run reports changed=false. On host C nginx is already installed at the declared version and the apt task reports changed=false. Which mechanism produces these results?
MCQ-1A team manages 300 hosts with a declarative configuration tool that runs every 20 minutes and reports the total number of resource changes across the fleet. The manifest declares four resources per host (a package, a config file, a directory, and a service) with no notify or subscribe links between them. The first run against a fresh fleet reports changed=1200. A second run 20 minutes later, with no manifest edits, reports changed=0. At 11:00 an operator deletes the config file on 18 hosts and stops the service on 9 of those same hosts. The next run starts at 11:20. What does it report?
MCQ-13A fleet of 200 web nodes runs a configuration agent every 30 minutes. The agent's catalog has exactly two resources: the content of /etc/nginx/conf.d/upstream.conf and the state of the nginx.service unit (running). No notify, subscribe or restart is wired between them, and the unit resource only ensures the service is running. At 08:55 an operator edits the catalog so upstream.conf points at a new pool. The 09:00 agent run completes on all 200 nodes, each reporting '1 changed'. Between 09:00 and 09:30, 12 nodes are rebooted by an unrelated kernel patch and come back up. The 09:30 agent run reports '0 changed' on all 200 nodes. At 09:35, how many nodes are serving the new upstream pool?
MCQ-19A Deployment's `replicas` field is written by two controllers: a GitOps reconciler that applies the manifest from Git (`replicas: 3`) every 30 s, and a HorizontalPodAutoscaler (`minReplicas: 3`, `maxReplicas: 10`) that has scaled the Deployment to 7. `kubectl get deploy` shows the replica count alternating between 3 and 7 roughly every 30 s, and the HPA keeps emitting `SuccessfulRescale` events. Autoscaling must keep working. Which change stops the oscillation?
MCQ-16A platform team publishes a shared configuration module `net-defaults` to an internal registry. Each of 60 services declares `net-defaults = ">=1.4"` in its manifest, and the build resolves the highest matching version at build time. On Tuesday 09:00 the maintainers publish 1.5.0, which raises the default `connect_timeout` from 2 s to 10 s. By 11:00, 23 services have rebuilt and their integration tests fail: p99 request latency rose from 180 ms to 900 ms. The 37 services that have not rebuilt still pass. The team wants the manifest to keep declaring the compatibility range `>=1.4`, and wants the version a service builds against to change only when that service's owners commit a change to its repository. Which change to how the dependency is consumed achieves that?
MCQ-7A service reads `DB_POOL_SIZE` from the environment and falls back to a built-in default of 10 when the variable is unset. Staging and prod run the same image digest. Staging's ConfigMap sets `DB_POOL_SIZE=40`, and staging pods hold 40 connections each. Prod's ConfigMap is rendered by a script that emits only the keys listed in `required-keys.txt`; that file has six keys and `DB_POOL_SIZE` is not one of them. Prod pods hold 10 connections each, prod serves three times staging's request rate, and prod's logs show no connection errors. Which explanation fits?
MCQ-11A Deployment runs six replicas of a Go service that mounts ConfigMap app-config as a volume and exposes the key app.yaml at /etc/app/config/app.yaml using subPath: app.yaml. The app re-reads that file every 30 seconds. Four hours after kubectl edit configmap app-config changed a value, kubectl get configmap app-config -o yaml shows the new value, but kubectl exec <pod> -- cat /etc/app/config/app.yaml still prints the old one on every pod across all three nodes, and no pod has restarted. Which explanation fits the evidence?
MCQ-10A payments service reads its database password from a Kubernetes Secret injected as an environment variable. The team rotates the password in the secret store, updates the Secret object, and does not restart the pods. The database accepts the old password for a 15-minute grace window. Twenty minutes after rotation, what is the state of the service?
MCQ-8A deploy pipeline renders a service config from a template, runs `svc --check-config` on the rendered file (it parses the file and validates it against a JSON schema), then sends SIGHUP to all 240 hosts. The schema declares `max_conns` as `{"type": "integer", "minimum": 0}`, and the template writes `max_conns: 0` when `MAX_CONNS` is unset. In one rollout `MAX_CONNS` is unset on 18 hosts. All 240 hosts pass `--check-config` and log `config reloaded`; the 18 hosts then reject every request with `pool exhausted`, while the other 222 serve normally. Which change to the pipeline would have stopped the 18 hosts from reloading into a broken state?
MCQ-24A nightly backup job runs this in bash, with no `set -o pipefail`: ``` pg_dump -Fc appdb | gzip > /backups/appdb.dump.gz ``` The job reports exit code 0. The file is 1.2 MB, where previous nights produced about 40 MB, and `pg_restore` on it fails with `unexpected end of file`. What does the job's exit code 0 establish about this run?
MCQ-2A team manages an Auto Scaling group with Terraform. The config sets `desired_capacity = 4`, and a target-tracking scaling policy is attached to the same group. Every night `terraform plan` reports `desired_capacity: 7 -> 4`; the team applies it, and the next morning the plan reports the same `7 -> 4` again. What is the correct diagnosis?
MCQ-3A team's CI pipeline runs `terraform apply` on every merge to main. The Lambda function resource sets `source_code_hash = filebase64sha256("build/lambda.zip")`. The build step writes a generated `build-info.json`, recording the commit SHA and the build timestamp, into the zip before zipping. Across 30 merges in a week, every apply reports `~ source_code_hash` changing and updates the function, including the 22 merges that touch no Lambda source. Which change makes applies a no-op when Lambda source is unchanged?
MCQ-22A playbook runs every 5 minutes against 40 hosts. It renders /etc/app/app.conf from a template whose first line is `# generated at {{ ansible_date_time.iso8601 }}`, then notifies a handler that restarts app.service. The config values themselves change about once a week, yet app.service restarts on every run, dropping in-flight requests for ~20 s each time (p99 900 ms). Which change stops the restarts on runs where no config value changed while still restarting the service when one does?
MCQ-6A Terraform module's `local-exec` provisioner runs `vendor-cli webhook create --url https://api.example.com/hooks` on every apply. The CLI has no idempotency flag and exits 0 whether or not a webhook with that URL already exists; the vendor does not deduplicate. After a config-only change triggered a re-apply, the vendor held two webhooks for that URL and the consumer's daily processed count went from 1.2M to 2.4M. Which change makes the provisioner safe to re-run?
MCQ-5An Ansible play targets 4 web hosts. Task 1 templates `/etc/app/app.conf` and notifies the `restart app` handler. Task 2 calls `http://localhost:8080/health`, retrying for 30 seconds, and registers the final status code without failing the play. The handler runs `service: name=app state=restarted`. On a run where the template's content changed on all 4 hosts, task 2 registers 500 on all 4 hosts. Re-running the same play with no further config change registers 200 on all 4 hosts. What is the cause?
MCQ-14A GitOps reconciler with `selfHeal: true` fetches the Git manifest at the start of each 3-minute sync and resets any live field that differs from it. The manifest declares `replicas: 4` and `max_connections: 5`. At 10:00:00 the live Deployment matches the manifest. At 10:00:30 an SRE patches the live Deployment to `replicas: 12` and `max_connections: 500` to absorb a traffic spike. At 10:01:00 the SRE commits `max_connections: 500` to Git but leaves `replicas: 4` unchanged. The reconciler syncs at 10:03:00. What are the live values at 10:03:30?
MCQ-4An ApplicationSet renders the same Git path, apps/checkout/overlays/prod, into two Argo CD Applications, checkout-eu and checkout-us. Both use automated sync with self-heal enabled and reconcile every 3 minutes. At 02:14 a bad PAYMENT_TIMEOUT_MS value in the shared ConfigMap pushes p99 latency to 900 ms in both clusters. An engineer edits the ConfigMap in checkout-eu with kubectl; the controller reverts it at 02:16. Which action gets both clusters onto the corrected value and keeps them reconciled?
MCQ-9A Terraform config declares an `aws_iam_role` named `acme-app` and an `aws_iam_role_policy_attachment` whose `role` argument is `aws_iam_role.app.name`. `terraform plan` reports `Plan: 2 to add, 0 to change, 0 to destroy` and CI merges. The apply creates the role, then fails on the attachment with `NoSuchEntity: The role with name acme-app cannot be found`. Re-running `terraform apply` seconds later succeeds with `Plan: 1 to add`. What explains the first apply's failure?
MCQ-17A `terraform apply` runs against a configuration with 40 resources. The `aws_db_instance.main` resource fails after 20 minutes with `Error: creating RDS Instance: timeout while waiting for state to become 'available'`. Five other resources reference `aws_db_instance.main`; the remaining 34 do not depend on it. Terraform's default behavior applies. Which outcome is correct?
MCQ-18A service deploys by committing `config.yaml` and running `deploy.sh`, which applies a schema migration and rotates the database password before the app restarts. The documented rollback is `git revert config.yaml && deploy.sh`. After a bad deploy the team runs it: the app starts, but every query fails with `password authentication failed`. Which assumption in that rollback step is the one that broke?
MCQ-12A payments service runs 400 instances, 100 in each of four availability zones (az-1 to az-4). Within each AZ, 10 instances are hot, together they carry 80% of that AZ's traffic, and 90 are cold. You are rolling out a change to the request-timeout value. The new value only changes behaviour when an instance is under load, and a bad value makes requests fail rather than merely slow down. The rollout policy says the first cohort must be at most 5% of the fleet and must include at least one instance in every AZ. Which first cohort should you pick?
MCQ-21A fleet of 400 hosts runs an agent that pushes a `disk_ok: true` heartbeat every 30 seconds to a central dashboard. During an incident, the dashboard shows 400/400 healthy, but an independent SSH sweep finds 48 hosts with `/var` at 100% and their agent processes dead for 25 minutes. What should the team do first?
MCQ-23A fleet of 4,000 endpoints is managed by a desired-state config tool. 3,300 are servers that check in every 5 minutes; 700 are field laptops that check in on average every 9 days, worst case 30. The tool writes one compliance flag per endpoint when that endpoint reports, comparing the reported config against the desired version in force at that moment. The dashboard tile counts endpoints whose stored flag is true and does not exclude stale reports. Desired version v42 is published at 09:00. At 10:00 the tile reads 100%. Which reading of that figure is correct?
MCQ-25A platform team runs Argo CD 2.x in a dedicated management cluster and syncs four workload clusters - prod-a, prod-b, prod-c and staging - from a Git repo that holds both the rendered Argo CD install manifests and the four Application definitions (a migration to external secrets had stalled half way). Repo credentials and the prod-a cluster Secret are kept in Vault and re-rendered into the argocd namespace by an ExternalSecret declared in the repo with refreshInterval 1m. The cluster Secrets for prod-b, prod-c and staging were created once with kubectl create secret in that namespace and exist nowhere else. A disk failure destroys the management cluster's etcd and there is no snapshot; the four workload clusters themselves are untouched. After the team rebuilds the management cluster from the in-repo manifests, which outcome follows?