Crossplane
Building a Control Plane with Kubernetes.
Crossplane
Crossplane is a Kubernetes Add-on. It runs inside your cluster and constantly reconciles your infrastructure. It turns Kubernetes into a Universal Control Plane.
How it works
- Install Crossplane into a K8s cluster.
- Install Providers (AWS, GCP, Azure) into Crossplane.
- Create Resources by writing Kubernetes YAML.
Instead of kubectl apply -f pod.yaml, you run kubectl apply -f database.yaml, and Crossplane spins up an RDS Instance on AWS.
Compositions (XRDs)
The killer feature of Crossplane is the ability to create your own APIs.
You don't want developers asking for an "AWS RDS db.t3.medium". You want them asking for a PostgresDB.
- Composite Resource Definition (XRD): Defines the API (e.g.,
kind: PostgresDB). - Composition: Defines the implementation (e.g., "On AWS, map
PostgresDBto anRDS Instance+Security Group+Subnet Group").
The Developer Experience: The developer writes this simple YAML:
apiVersion: my-company.io/v1alpha1
kind: PostgresDB
metadata:
name: my-db
spec:
storage: 20GBCrossplane watches this and automatically provisions the underlying AWS resources.
GitOps + Crossplane
Since Crossplane resources are just Kubernetes YAML, you can manage your cloud infrastructure using ArgoCD.
- Commit
s3-bucket.yamlto Git. - ArgoCD syncs it to the K8s Cluster.
- Crossplane sees the new resource and calls the AWS API to create the bucket.
- Drift Detection: If someone deletes the bucket in the AWS Console, Crossplane (running in the loop) sees it's missing and recreates it automatically.
Complexity Warning
Crossplane is powerful but heavy. You are effectively building your own internal Heroku. Only use it if you have a Platform Team dedicated to maintaining the Control Plane.