Introduction to Crossplane
Kubenatives Newsletter - Edition #18
Kubernetes-Powered Cloud Infrastructure Management
As Kubernetes adoption grows, managing infrastructure across multiple cloud providers and services becomes increasingly complex. Traditionally, teams use tools like Terraform, Pulumi, or CloudFormation to define infrastructure as code (IaC). But what if Kubernetes itself could manage cloud infrastructure the same way it manages applications?
Enter Crossplane—a Kubernetes-native control plane that enables you to provision and manage cloud infrastructure using Kubernetes APIs.
In this beginner-friendly guide, we’ll break down:
What Crossplane is and why you should use it
How it differs from Terraform and Pulumi
How to deploy your first Crossplane-managed resource
Best practices for integrating Crossplane into your Kubernetes workflows
Let’s dive in.
1. What is Crossplane?
Crossplane is an open-source Kubernetes add-on that enables you to define, provision, and manage cloud resources (databases, storage, networking, compute, etc.) using Kubernetes CRDs (Custom Resource Definitions).
Instead of writing Terraform or CloudFormation scripts, Crossplane lets you manage cloud infrastructure by creating Kubernetes YAML manifests.
✅ Key Features of Crossplane:
Kubernetes-native infrastructure management: Define infrastructure as Kubernetes resources.
Multi-cloud support: Manage AWS, Azure, GCP, and on-prem resources using the same API.
Composability: Create higher-level abstractions for cloud resources with Crossplane Compositions.
GitOps-friendly: Works seamlessly with Argo CD, Flux, and other Kubernetes-native CI/CD tools.
Extensibility: You can extend Crossplane by writing custom providers.
Example Use Case
Imagine you want to create an RDS database on AWS. With Crossplane, you define a Kubernetes manifest (YAML) instead of writing Terraform code. Once applied, Kubernetes provisions the RDS instance for you.
2. How is Crossplane Different from Terraform & Pulumi?
Crossplane continuously reconciles infrastructure like Kubernetes does for pods, making it ideal for declarative, self-healing infrastructure.
3. Setting Up Crossplane
Step 1: Install Crossplane
If you have a running Kubernetes cluster, install Crossplane using Helm:
helm repo add crossplane-stable https://charts.crossplane.io/stable
helm install crossplane crossplane-stable/crossplane --namespace crossplane-system --create-namespace
Verify the installation:
kubectl get pods -n crossplane-system
4. Creating a Managed Cloud Resource with Crossplane
Step 2: Install a Crossplane Provider
Providers are Crossplane plugins that allow you to manage cloud services. For AWS, install the AWS provider:
kubectl apply -f https://raw.githubusercontent.com/crossplane/crossplane/master/docs/snippets/provider-aws.yaml
Create a ProviderConfig for AWS authentication:
apiVersion: aws.crossplane.io/v1beta1
kind: ProviderConfig
metadata:
name: aws-provider
spec:
credentials:
source: Secret
secretRef:
namespace: crossplane-system
name: aws-creds
key: creds
Step 3: Create a Cloud Resource Using Kubernetes YAML
Here’s an example of how to create an S3 bucket using Crossplane:
apiVersion: s3.aws.crossplane.io/v1beta1
kind: Bucket
metadata:
name: my-crossplane-bucket
spec:
providerConfigRef:
name: aws-provider
forProvider:
region: us-west-2
Apply the YAML:
kubectl apply -f s3-bucket.yaml
Crossplane will now provision an AWS S3 bucket and manage its lifecycle just like a Kubernetes resource.
5. Best Practices for Using Crossplane
🔹 Use Crossplane Compositions – Abstract and define reusable infrastructure blueprints for your organization.
🔹 Manage Cloud Credentials Securely – Use Kubernetes secrets and avoid storing them in plaintext.
🔹 Integrate with GitOps – Manage infrastructure declaratively using Argo CD or Flux.
🔹 Monitor with Crossplane Metrics – Use Prometheus and Grafana to track infrastructure state.
🔹 Adopt a Least Privilege Approach – Ensure IAM roles have minimal permissions to reduce risk.
6. Why Use Crossplane for Infrastructure Management?
✅ Kubernetes-native control – Manage infrastructure the same way you manage applications.
✅ Multi-cloud abstraction – Define infrastructure once, deploy anywhere.
✅ Continuous reconciliation – Self-healing infrastructure with automatic drift correction.
✅ DevOps-friendly – Seamlessly integrates with CI/CD and GitOps workflows.
✅ Scalability – Designed for large-scale cloud-native environments.
If you love Kubernetes and want to manage infrastructure declaratively, Crossplane is the future.
7. Further Learning & Resources
📖 Crossplane Documentation
📖 Crossplane AWS Provider
📖 Kubernetes Resource Model (KRM)
Final Thoughts
Crossplane is changing the way we manage cloud infrastructure by bringing it into Kubernetes. Whether you’re managing databases, VMs, or networks, Crossplane lets you apply Kubernetes best practices to infrastructure provisioning.
If you find this newsletter valuable and want to learn more, consider becoming a paid subscriber.
As a paid subscriber, you will receive exclusive weekly deep dive articles and access to DevOps coding challenges.




