A platform team follows the principle of immutable infrastructure for their cloud native workloads. When they need to change the configuration of a running service, which approach is consistent with this principle?
- AOpen a shell into each running container and edit the configuration files directly so no redeploy is needed
- BAttach a configuration volume and hot-patch the binary on each host while the service keeps serving
- CBuild a new container image with the change and roll out fresh replacement instances, discarding the old ones Correct
- DRun a configuration management agent that periodically reconciles and rewrites files on the live servers
Why A is wrong: Editing files inside a live container is tempting because it seems faster, but it mutates the running instance in place, which is the mutable pattern immutable infrastructure exists to avoid.
Why B is wrong: Hot-patching a running binary sounds efficient and zero-downtime, but it modifies existing instances rather than replacing them, so it violates immutability and causes environment drift.
Why C is correct: Immutable infrastructure means a running instance is never modified in place; a change produces a new image or artifact that replaces the existing instances entirely, which is exactly what this describes.
Why D is wrong: An agent that continuously mutates live servers is a classic mutable-infrastructure workflow; it changes instances in place instead of replacing them, so it is the opposite of the immutable approach.