# Controller-Driven Infrastructure as Code

DevFeed: [Controller-Driven Infrastructure as Code](<https://devfeed.tech/articles/controller-driven-infrastructure-as-code-22994.md>)

Original publisher: [Read original article](<https://bravenewgeek.com/controller-driven-infrastructure-as-code/>)

Published: 2025-03-19T20:36:25Z

Content type: article

Language: en

Sources: [Brave New Geek](<https://devfeed.tech/sources/brave-new-geek.md>)

Topics: [Infrastructure as code](<https://devfeed.tech/topics/infrastructure-as-code.md>), [Kubernetes](<https://devfeed.tech/topics/kubernetes.md>), [consistency](<https://devfeed.tech/topics/consistency.md>), [Terraform](<https://devfeed.tech/topics/terraform.md>), [AWS CloudFormation](<https://devfeed.tech/topics/aws-cloudformation.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [API](<https://devfeed.tech/topics/api.md>)

Tags: [cloudformation](<https://devfeed.tech/tags/cloudformation.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [controllers](<https://devfeed.tech/tags/controllers.md>), [declarative](<https://devfeed.tech/tags/declarative.md>), [iac](<https://devfeed.tech/tags/iac.md>), [infrastructure](<https://devfeed.tech/tags/infrastructure.md>), [infrastructure-as-code](<https://devfeed.tech/tags/infrastructure-as-code.md>), [koreo](<https://devfeed.tech/tags/koreo.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [platform-engineering](<https://devfeed.tech/tags/platform-engineering.md>), [policy](<https://devfeed.tech/tags/policy.md>), [reconciliation](<https://devfeed.tech/tags/reconciliation.md>), [resource-orchestration](<https://devfeed.tech/tags/resource-orchestration.md>), [terraform](<https://devfeed.tech/tags/terraform.md>)

## AI overview

The article explains Controller-Driven Infrastructure as Code, applying Kubernetes controllers and the Kubernetes Resource Model to infrastructure management. It contrasts this resource-centric, continuously reconciled approach with the operation-centric models used by Terraform and CloudFormation.

## Source excerpt

Harnessing the Kubernetes Resource Model for modern infrastructure management Infrastructure as Code (IaC) revolutionized how we manage infrastructure, enabling developers to define resources declaratively and automate their deployment. However, tools like Terraform and CloudFormation, despite their declarative configuration, rely on an operation-centric model, where resources are created or updated through one-shot commands. The evolution of IaC: From operations to controllers In contrast, Kubernetes introduced a new paradigm with its controller pattern and the Kubernetes Resource Model (KRM). This resource-centric approach to APIs redefines infrastructure management by focusing on desired state rather than discrete operations. Kubernetes controllers continuously monitor resources, ensuring they conform to their declarative configurations by performing actions to move the actual state closer to the desired state, much like a human operator would. This is known as a control loop.