5.3 - Configuration management and containers

Cloud+ CV0-004 objective 5.3 covers configuration management and containers. Configuration management tools such as Ansible and Puppet enforce a defined desired state on servers, so drift is corrected automatically. Ansible is a common agentless tool that uses YAML playbooks and SSH to configure servers, needing no software installed on the targets. A container is a lightweight package that bundles an app with its dependencies so it runs the same on any host, more efficient than a full VM. Kubernetes is a platform that schedules, scales and self-heals containers across a cluster of nodes, restarting failed containers and spreading load. You should also know Docker, images, registries and pods. Expect scenario questions that describe enforcing desired state, an agentless YAML tool, packaging an app with its dependencies, or orchestrating containers, and ask which technology - configuration management, Ansible, a container or Kubernetes - fits.

Memory hook
Enforce desired state on servers (fix drift) = configuration management. Agentless, YAML playbooks over SSH = Ansible. App + dependencies, runs anywhere = container. Schedule/scale/self-heal containers = Kubernetes.

Practice questions

1. A tool that enforces a defined desired state on servers (e.g., Ansible, Puppet) performs:

  • Source control
  • Configuration management (correct answer)
  • Traffic load balancing
  • Application containerization

Configuration management keeps systems in a declared state and corrects configuration drift automatically. Version control tracks code history; containers package apps.

2. Two pipeline runs try to change infrastructure at once; a lock stops the second. This prevents:

  • Feature flag drift
  • Corrupted IaC state (correct answer)
  • Sticky load sessions
  • Cold start delays

State locking blocks concurrent writes to the IaC state file, preventing two runs from corrupting it or clobbering each other's changes. It serializes infrastructure updates.

3. A lightweight package bundling an app with its dependencies to run the same on any host is a:

  • Virtual machine
  • Container (correct answer)
  • Hypervisor
  • Snapshot

A container packages an app with its libraries and shares the host kernel, staying lightweight and portable. A VM includes a full guest OS and is heavier.

4. A platform that schedules, scales and self-heals containers across a cluster of nodes is:

  • A registry
  • A hypervisor
  • Kubernetes (correct answer)
  • A load balancer

Kubernetes orchestrates containers across nodes: scheduling, scaling, restarts and service discovery. A registry only stores images; a hypervisor runs VMs, not containers.

5. Which agentless tool commonly uses YAML playbooks and SSH to configure servers?

  • Ansible (correct answer)
  • Docker
  • Terraform
  • Grafana

Ansible is agentless, pushing YAML playbooks over SSH to enforce configuration. Terraform provisions infrastructure declaratively; Docker packages containers; Grafana visualizes metrics.

6. A text file listing the steps to assemble a container image layer by layer is a:

  • Manifest
  • Dockerfile (correct answer)
  • Route table
  • Playbook

A Dockerfile is a text file of ordered instructions used to build a container image layer by layer. A Kubernetes manifest instead declares resources; a playbook configures servers.

Related objectives