Crossplane is an open-source framework that turns Kubernetes into a universal control plane for cloud infrastructure. In the practice of Infrastructure as code, it lets teams declare databases, networks, buckets and clusters as Kubernetes custom resources, and then continuously reconciles those declarations against the real state of each cloud provider.
Unlike tools that apply changes only when an engineer runs a command, Crossplane runs as a set of controllers inside a Kubernetes cluster. It is a graduated project of the Cloud Native Computing Foundation, and its central idea is that platform teams can publish their own infrastructure APIs, hiding provider details behind simple, opinionated abstractions.
How Crossplane reconciles cloud resources
Crossplane works through the standard Kubernetes controller pattern: each controller watches a resource type, compares the desired state stored in the cluster with the actual state reported by the cloud API and issues calls to close the gap. The loop repeats at regular intervals, so manual changes made in a cloud console are detected and reverted.
This design replaces a separate state file with the Kubernetes API server and etcd as the record of truth. Status fields on each object show whether a resource is ready and synced, and Kubernetes RBAC governs who may create or modify it. Credentials for each cloud account are referenced through a ProviderConfig object, usually backed by a Kubernetes secret or workload identity.
The building blocks below appear in almost every Crossplane installation.
| Building block | What it is | Role in the system |
|---|---|---|
| Provider | Installable package with controllers | Talks to one cloud or service API |
| Managed resource | Custom resource for one external object | Represents an RDS instance, a VPC or a bucket |
| ProviderConfig | Credentials and settings object | Selects the account and authentication method |
| CompositeResourceDefinition | Schema for a new platform API | Defines fields that consumers may set |
| Composition | Template or function pipeline | Maps one composite resource to many managed resources |
| Composite resource | Instance of the custom platform API | What application teams actually request |
Compositions and platform APIs
Compositions are the feature that distinguishes Crossplane from a simple cloud operator. A platform team writes a CompositeResourceDefinition, or XRD, that declares a new resource type such as PostgreSQLInstance with a few fields like size and region. A Composition then expands each request into the concrete managed resources: a database instance, a subnet group, a parameter group and a secret with connection details.
Modern Crossplane builds Compositions from composition functions, which are containerized steps in a pipeline. Functions can render templates in Go templating, KCL or Python, apply patches and add logic that older static patch lists could not express. This gives platform teams programmable abstractions while consumers still see one small, stable API.
Different resource scopes suit different consumers, as the table shows.
| Resource scope | Typical author | Typical consumer |
|---|---|---|
| Managed resource | Provider maintainers | Platform engineers needing full control |
| Composite resource | Platform team | Platform team or automation pipelines |
| Namespaced claim or composite | Platform team | Application teams in their own namespace |
Crossplane compared with other infrastructure as code tools
Crossplane differs from tools such as Terraform, OpenTofu and Pulumi mainly in when and where reconciliation happens. Those tools run a plan and apply cycle on demand, typically from a pipeline, and keep state in a file or backend. Crossplane runs continuously inside a cluster and treats drift correction as normal behavior rather than an explicit step.
The comparison below highlights the trade-offs that usually drive tool selection.
| Aspect | Crossplane | Terraform or OpenTofu | AWS CloudFormation |
|---|---|---|---|
| Execution model | Continuous controllers | On-demand plan and apply | Managed stack operations |
| State storage | Kubernetes API and etcd | State file in a backend | Held by the cloud service |
| Drift handling | Automatic correction | Detected at next plan | Drift detection on request |
| Language | YAML plus functions | HCL | JSON or YAML templates |
| Multi-cloud scope | Many providers | Very broad provider ecosystem | AWS only |
| Change preview | Limited, improving | Detailed plan output | Change sets |
The approaches can coexist. Some organizations use Terraform to bootstrap the management cluster and its network, then let Crossplane serve self-service requests from application teams. Crossplane also offers a provider that runs Terraform configurations, which helps during gradual migration.
Adopting Crossplane in practice
Successful adoption usually starts with a dedicated management cluster that hosts Crossplane and nothing else, so that workload incidents cannot disrupt infrastructure control. Providers are installed as packages, credentials are configured per account and a small set of composite APIs is published for the most frequently requested resources.
Crossplane fits naturally with GitOps workflows. Claims and composite resources are stored in Git, and a tool such as Argo CD or Flux applies them to the cluster, which gives pull-request review and audit history for every infrastructure change. Policy as code engines such as Open Policy Agent Gatekeeper or Kyverno can then enforce rules on requests before Crossplane acts on them.
The decision table below summarizes when Crossplane is a strong choice.
| Situation | Recommendation | Reason |
|---|---|---|
| Platform team building self-service | Strong fit | Composite APIs hide provider complexity |
| Organization already standardized on Kubernetes | Strong fit | Reuses RBAC, GitOps and tooling |
| Small team with few static resources | Usually unnecessary | Cluster overhead outweighs benefits |
| Strict need for reviewed change plans | Combine with care | Preview of changes is less mature |
Limitations and common mistakes
Crossplane adds operational weight: the management cluster must be highly available, backed up and upgraded, because losing etcd means losing the record of managed infrastructure. Large provider packages also install hundreds of custom resource definitions, which can strain the API server unless teams install only the provider families they need.
- Deleting a claim deletes the cloud resource by default; set the deletion policy to orphan for data stores that must survive.
- Overly generic Compositions recreate the full provider surface and defeat the purpose of a simple platform API.
- Shared administrator credentials in one ProviderConfig weaken isolation between teams and environments.
- Ignoring status conditions hides failed reconciliations until an application cannot connect.
Stripped to the essentials
Crossplane lets a company order cloud services the same way it runs its applications on Kubernetes. A developer writes a short request such as asking for a small database in Europe. Crossplane then creates everything needed behind the scenes and keeps checking that it stays exactly as requested.
Think of it as a building manager with a written plan. If someone moves a wall without permission, the manager notices and puts it back. The plan, not manual changes, decides what exists.
Where it is applied
A retail company with about 60 development teams runs workloads on two cloud providers. Requests for databases used to go through a ticket queue that took several days, and each team configured backups and encryption differently.
The platform team installs Crossplane on a management cluster and publishes one composite API for relational databases with three fields: size, region and backup tier. Behind it, two Compositions create the correct resources for each provider, always with encryption, private networking and automated backups enabled. Teams commit a short YAML claim to Git, and Argo CD applies it.
Within a quarter, database provisioning drops from days to about fifteen minutes, and configuration audits find no unencrypted instances. When an engineer disables backups in a cloud console during testing, Crossplane restores the setting on its next reconciliation.