Crossplane vs. Terraform: The Battle for Infrastructure Control
Terraform has been the king of Infrastructure as Code (IaC) for years. But a new challenger, Crossplane, is gaining traction by bringing infrastructure management directly into Kubernetes.
Terraform: The Proven Standard
- Language: HCL (HashiCorp Configuration Language).
- Workflow: Plan and Apply. State is stored in a file (local or remote).
- Pros: Massive provider ecosystem, human-readable, widely known.
- Cons: Management of state files, no built-in drift correction (without extra tools).
Crossplane: The Kubernetes-native Challenger
- Language: YAML (Kubernetes Custom Resources).
- Workflow: Control Loop. Crossplane continuously reconciles the actual state with the desired state in Kubernetes.
- Pros: Native drift detection, unified management of apps and infra, uses Kubernetes RBAC.
- Cons: Steeper learning curve for non-Kubernetes users, YAML verbosity.
What really changes (beyond HCL vs. YAML)
The biggest difference is the operating model:
- With Terraform, you apply intent at a point in time (and manage drift via plans, reviews, and jobs).
- With Crossplane, you delegate intent to a controller that continuously reconciles (like Kubernetes does for deployments).
That impacts how you handle drift, permissions, auditability, and self-service.
A 3-question decision guide
- Is Kubernetes your source of truth? If your teams already live in Kubernetes (RBAC, namespaces, GitOps), Crossplane fits naturally.
- Do you manage lots of non-Kubernetes resources? IAM, networking, accounts/projects, SaaS: Terraform is often simpler and better-supported.
- Do you want opinionated self-service? Crossplane shines when you model abstractions (Compositions): “create a database” becomes a Kubernetes resource.
Common pitfalls
- Crossplane without product thinking: exposing provider-shaped CRDs can push complexity onto developers.
- Terraform without guardrails: without modules, CI, and policy checks, “plan/apply” becomes a constant cleanup effort.
- Wrong split of responsibilities: keep the cloud “foundation” (network, IAM, accounts) stable and governed; iterate self-service on top.
Which one should you choose?
- Choose Terraform if you have a wide variety of non-Kubernetes resources or if your team is already proficient in HCL.
- Choose Crossplane if you are "all-in" on Kubernetes and want to manage your infrastructure using the same tools and patterns as your applications.
Conclusion
The choice between Terraform and Crossplane depends on your ecosystem and desired operating model. Terraform remains the versatile leader, while Crossplane offers a compelling vision of infrastructure managed through the Kubernetes API and a reconciliation loop.
In practice, many organizations combine them: Terraform for foundations, Crossplane for Kubernetes-native self-service abstractions.
Want to go deeper on this topic?
Contact Demkada