Crossplane extends Kubernetes to manage cloud infrastructure. Define AWS, GCP, Azure resources as Kubernetes manifests — manage databases, buckets, VPCs with kubectl apply.
Why Crossplane?
- Kubernetes-native — manage cloud resources as K8s objects
- Any cloud — AWS, GCP, Azure, 50+ providers
- Compositions — create reusable infrastructure abstractions
- GitOps — combine with Argo CD for full GitOps infra
- Free — CNCF project, open source
Install
helm repo add crossplane-stable https://charts.crossplane.io/stable
helm install crossplane crossplane-stable/crossplane --namespace crossplane-system --create-namespace
# Install AWS provider
cat <<EOF | kubectl apply -f -
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
name: provider-aws-s3
spec:
package: xpkg.upbound.io/upbound/provider-aws-s3:v1.1.0
EOF
Create Cloud Resources (kubectl!)
# S3 bucket
apiVersion: s3.aws.upbound.io/v1beta1
kind: Bucket
metadata:
name: my-app-data
spec:
forProvider:
region: us-east-1
tags:
Environment: production
providerConfigRef:
name: aws-config
---
# RDS PostgreSQL
apiVersion: rds.aws.upbound.io/v1beta1
kind: Instance
metadata:
name: my-postgres
spec:
forProvider:
region: us-east-1
engine: postgres
engineVersion: "16"
instanceClass: db.t3.micro
allocatedStorage: 20
dbName: myapp
masterUsername: admin
masterPasswordSecretRef:
name: db-password
namespace: default
key: password
kubectl apply -f infrastructure.yaml
kubectl get buckets # Check status
kubectl get instances # Check RDS status
Compositions (Reusable Abstractions)
# Define what a "Database" means in your org
apiVersion: apiextensions.crossplane.io/v1
kind: CompositeResourceDefinition
metadata:
name: databases.infra.example.com
spec:
group: infra.example.com
names:
kind: Database
plural: databases
versions:
- name: v1
served: true
referenceable: true
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
size:
type: string
enum: [small, medium, large]
engine:
type: string
enum: [postgres, mysql]
---
# Team just says "I want a database"
apiVersion: infra.example.com/v1
kind: Database
metadata:
name: orders-db
spec:
size: medium
engine: postgres
Key Features
| Feature | Details |
|---|---|
| Providers | AWS, GCP, Azure, 50+ |
| Resources | 1000+ managed resource types |
| Compositions | Reusable infra abstractions |
| Control plane | Kubernetes API |
| GitOps | Works with Argo CD, Flux |
| RBAC | Kubernetes RBAC for infra |
Resources
Need cloud infrastructure tools? Check my Apify actors or email spinov001@gmail.com.
Top comments (0)