Crossplane: Kubernetes-Native Infrastructure Management

6 min read
Share:

INTRODUCTION:

Kubernetes makes application management simple: we define the deployments, services and configurations of our services in YAML and Kubernetes is taking care of maintaining the desired state.

However, applications usually require infrastructure to run on – databases, s3 buckets, iam roles, load balancers, vpc’s etc. We manage these resources with separate tools, usually terraform, cloud consoles, cli and ci/cd.

Now imagine being able to manage both in the same, kubernetes native way. Can we somehow unify the way we manage infrastructure and applications?

This is where Crossplane comes in.

WHAT IS CROSSPLANE?

Crossplane is an open-source control plane framework for platform engineering. It extends Kubernetes so that Kubernetes APIs can be used to manage external cloud and cloud-native resources.

At a high level, the idea is simple:

Crossplane high-level flow

Crossplane high-level flow

Rather than treating infrastructure as something separate from Kubernetes, Crossplane enables infrastructure to be part of the Kubernetes control plane.

For example, an AWS S3 bucket can be a resource in Kubernetes. The user can generate that resource, by way of a YAML manifest, and Crossplane’s provider handles the communication with AWS, creating and managing the actual S3 bucket.

WHY DO WE NEED CROSSPLANE?

The problem isn’t that existing Infrastructure as Code tools are ineffective. Terraform, for example, is widely used and remains a powerful option for infrastructure provisioning.

The challenge appears when organizations operate large Kubernetes-based platforms and want infrastructure provisioning to become part of a self-service developer platform.

Infrastructure and applications may otherwise involve different tools, workflows, state management mechanisms, and pipelines.

Crossplane brings these worlds closer together.

With Crossplane, a platform team can define how infrastructure should be provisioned while exposing a simpler interface to application teams.

Instead of requiring a developer to learn all the details of creating a production database, the platform team could expose a simple resource like:

type: db

meta data:

name: application-db

Crossplane could provision and configure the necessary infrastructure behind that simple resource.

The developer decides what they need. The platform team decides how it will be done.

HOW DOES CROSSPLANE WORK?

Crossplane builds on a fundamental Kubernetes concept: desired state and reconciliation.

Consider a workflow:

Kubernetes and Crossplane workflow diagram

Kubernetes and Crossplane workflow diagram

A user defines the desired infrastructure as a Kubernetes resource and submits it to the Kubernetes API.

Crossplane watches these resources. Its controllers compare the desired state with the actual state of the external resource and take action when necessary.

This reconciliation is an important aspect of the Crossplane model. If the external resource drifts from the desired configuration, Crossplane is able to detect the difference and work to bring it back to the desired state.

It’s like how Kubernetes manages resources for applications.

UNDERSTANDING THE CORE CONCEPTS

1. Providers
Providers connect Crossplane to external systems.

For example:

  • AWS
  • Azure
  • Google Cloud
  • Kubernetes
  • Other external APIs

A provider supplies the Kubernetes APIs and controllers required to communicate with the external system. The providers are maintaining the authentication, the external API calls and the reconciliation logic for the resources they are managing.

Think of a provider as the bridge between Kubernetes and an external platform.

2. Managed Resources
A managed resource (MR) is an external resource managed by the Crossplane.

The Kubernetes object represents the external resource, while the provider provided by Crossplane actually interacts with AWS.

Other examples include EC2 instances, S3 buckets, GCP clusters, and Azure databases.

3. Composite Resources
Managing individual cloud resources is useful, but platform engineering often requires a higher level of abstraction.

Imagine that creating a production database requires:

Networking, Security groups, subnets, RDS, Secrets, Monitoring configuration
Instead of exposing all of these resources to developers, a platform team can create a higher-level API.

This is where Composite Resources (XRs) become useful.

They allow platform teams to define custom APIs that represent the services their users actually need rather than exposing every underlying infrastructure detail.

4. Compositions
A Composition defines how a higher-level resource should be implemented.

The platform team defines the blueprint, while users consume the resulting abstraction.

This creates an important separation:

Platform team: Defines standards, security, architecture, and implementation.

Application team: Requests the infrastructure through a simple API.

Crossplane’s composition capabilities are therefore particularly relevant to building internal developer platforms.

WHAT’S NEW IN CROSSPLANE v2?

Crossplane v2 expands the idea beyond simply managing cloud infrastructure.

According to the v2.3 documentation, managed resources and composite resources are namespaced, compositions can work with any Kubernetes resource, and Crossplane introduces Operations for operational workflows.

This means a composition can potentially bring together different types of resources, including cloud resources, Kubernetes resources, and third-party custom resources.

Crossplane is therefore moving toward being a framework for building broader application and platform control planes, rather than being limited to infrastructure provisioning.

CROSSPLANE VS TERRAFORM

Crossplane and Terraform solve related problems, but their approaches are different.

TerraformCrossplaneInfrastructure as Code toolControl plane frameworkUses HCLUses Kubernetes APIs/YAMLTerraform stateKubernetes API/stateCLI/pipeline-driven workflowKubernetes reconciliationExcellent for general IaCStrong fit for Kubernetes-centric platforms

If an organization already has mature Terraform workflows, there may be little reason to replace them everywhere. But if the organization is building a Kubernetes-centric internal developer platform and wants infrastructure to be consumed through Kubernetes APIs, Crossplane becomes particularly interesting.

 

WHAT IS CROSSPLANE USEFUL FOR?

Some common uses:

  • Internal Developer Platforms – provide APIs to self-service infrastructure.
  • Platform Engineering – hide away complex infrastructure with simple interfaces.
  • GitOps – manage infrastructure resources in the same way as application resources.
  • Multi-cloud environments – present a single interface to multiple cloud providers.
  • Standardise infrastructure – Use reusable abstractions to enforce organisational patterns.
  • Self-service provisioning – enables teams to request approved infrastructure without managing every underlying detail.

Crossplane also provides integrations and guides for workflows such as GitOps with Argo CD, importing existing resources, monitoring, troubleshooting, and writing composition functions.

FINAL THOUGHTS

Crossplane is not simply another tool for creating an AWS bucket or an RDS database.

Its bigger idea is to bring the control-plane model of Kubernetes to platform engineering.

Kubernetes gave us a powerful way to declare what we want for applications:

“I want 3 replicas of this application.”

Crossplane extends that philosophy to platform capabilities:

“I want a production-ready database.”

The platform team can then decide what that database actually means in terms of networking, security, cloud resources, policies, and operational requirements.

That is the real value of Crossplane: turning complex infrastructure into reusable, governed, Kubernetes-native APIs.

And as organizations continue moving toward platform engineering and self-service infrastructure, this approach provides an interesting way to bridge the gap between application development and infrastructure management.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *