Terraform vs Crossplane: The Ultimate DevOps Infrastructure Showdown

Search for a command to run...

No comments yet. Be the first to comment.
There's a class of Kubernetes security bugs that makes platform engineers lose sleep. Not the "wrong RBAC rule" kind. The quiet, structural kind where your container runtime is operating exactly as de

You run EKS or GKE or AKS. You chose managed Kubernetes because you didn't want to operate etcd, patch API servers, or worry about control plane upgrades. The cloud provider handles it. You just run w

You use ArgoCD. Your manifests live in Git. Every change is a PR. You feel secure. But here's the question nobody in the GitOps world wants to answer: how do you know the image running in your cluster

A real-world incident narrative + definitive best practices for CoreDNS at scale

It started with a routine Tuesday deploy. Nothing fancy, a small config change to our ingress controller across a few clusters. We'd done this a hundred times. Standard values.yaml modification and th

Ping to Production
10 posts
Deep dives into Kubernetes orchestration, GitOps workflows, and Cloud-Native security. From scaling EKS clusters to building custom Go operators, I document my journey of automating the world, one YAML file at a time. Expect production-ready insights about DevOps, Agentic AI and SRE best practices.
Imagine it's 2 AM, and you are in a digital wrestling match with cloud configurations that seem to have a mind of their own. As a DevOps engineer, I've been there, drowning in a sea of manual deployments, battling configuration drift, and desperately seeking a way to bring order to infrastructure chaos.
Multiple cloud providers, endless configuration files, and the constant fear of inconsistent deployments have haunted me for days. Enter the game-changers: Infrastructure as Code (IaC):
Developed by HashiCorp, Terraform has been the backbone of infrastructure provisioning for years. With its declarative HashiCorp Configuration Language (HCL), it's essentially the Swiss Army knife of cloud infrastructure. Describe your entire infrastructure as code, version control it, and deploy across multiple cloud providers with surgical precision.
If Terraform is the seasoned veteran, Crossplane is the innovative newcomer challenging the status quo. Built with a Kubernetes-native approach, Crossplane reimagines infrastructure management by leveraging Kubernetes Custom Resource Definitions (CRDs). Applying a YAML to create a K8s Cluster has its own sense of satisfaction.
| Dimension | Terraform | Crossplane |
| Provider Support | 100+ cloud providers | Multi-cloud with Kubernetes-native approach |
| Configuration Language | Custom HCL | Kubernetes YAML |
| State Management | Explicit state files | Stateless, Kubernetes reconciliation |
Provision a basic web server:
resource "aws_instance" "web_server" {
# Specific Amazon Machine Image (AMI)
ami = "ami-0c55b159cbfafe1f0"
# Instance type selection
instance_type = "t2.micro"
# Resource tagging for management
tags = {
Name = "WebServer"
Environment = "Production"
ManagedBy = "Terraform"
}
}
Crossplane resource definition for AWS EC2 instance:
apiVersion: ec2.aws.upbound.io/v1beta1
kind: Instance
metadata:
name: web-server-crossplane
spec:
forProvider:
# Identical AMI and instance type
imageId: ami-0c55b159cbfafe1f0
instanceType: t2.micro
# Enhanced metadata and region specification
region: us-east-1
tags:
- key: Name
value: WebServer
- key: Environment
value: Production
State Management: Maintains explicit state files.
Kubernetes Native Reconciliation: Stateless resource management.
In the world of infrastructure management, adopting a hybrid approach can be a game-changer. Instead of rigidly choosing between Terraform and Crossplane, consider them as complementary tools.
Use Terraform for initial, comprehensive infrastructure setup across cloud providers, and then leverage Crossplane's dynamic Kubernetes-native capabilities for ongoing, flexible management. This strategy allows you to implement each tool's unique strengths precisely where they provide the most value, creating a more adaptive and powerful infrastructure provisioning ecosystem.
Remember, no tool is universally perfect. The right choice depends on:
P.S. If you are on AWS, do check out my colleague's article on Karpenter and how it helped us move from Reactive Scaling to Developer-Aware scaling: Autoscaling Evolved: Our Journey with Karpenter
Infrastructure as Code isn't just about selecting the right provisioning tool. It's about creating predictable, manageable, and scalable environments that adapt to your organization's evolving needs.