We are pleased to announce the first release of the DigitalOcean Crossplane Provider. Crossplane is an open source project that lets you turn a Kubernetes cluster into a universal control plane. Crossplane is an exciting addition to the CNCF Landscape because it allows you to create digital infrastructure resources from inside a Kubernetes cluster, simplifies setting up multi-cloud infrastructure and gives platform engineers a way to let application developers spin up and down cloud resources without requiring extensive knowledge of the cloud.
Crossplane allows you to interact with your cloud provider’s API from inside a Kubernetes cluster. This means that if you create a DigitalOcean Managed Kubernetes cluster, you can install Crossplane and then create other DigitalOcean resources like Droplets, Managed Databases and other Kubernetes Clusters.
With Crossplane, all cloud resources are stored in the Kubernetes API as a Custom Resource Definitions (CRDs), meaning that the resource can be defined through a yaml spec and stored in a code repository, unlocking the power of Infrastructure as Code and a GitOps workflow.
For example, this is a Kubernetes manifest for a DigitalOcean Droplet created with Crossplane:
Instead of creating this Droplet with the `doctl` command
doctl compute droplet create example-droplet --region nyc1 --size s-1vcpu-1gb --image ubuntu-20-04-x64
or from the DigitalOcean Cloud Console, the droplet is created with the command
kubectl apply -f droplet.yaml
Crossplane’s API is designed to work with nearly any cloud provider, meaning you can use a single Kubernetes cluster to build out multi-cloud infrastructure. Crossplane also has vendor-supported providers from many popular projects like Helm, Terraform, Kafka and GitHub, so you can build out sophisticated digital infrastructure and pair it with a deployment platform you build with prominent DevOps tools.
If you have projects hosted on different cloud platforms, like DigitalOcean and Amazon Web Services, you can use Crossplane to manage all those infrastructure resources from a single Kubernetes cluster instead of having to switch between different command line tools or web interfaces.
Crossplane is designed to let platform engineers define how application developers can create, update and destroy digital infrastructure resources without the application developers needing any knowledge of, or direct access to, a cloud provider’s API.
Imagine that a platform engineering team has determined that one of the application development teams they support needs to be able spin up and down a staging environment at will instead of having one that is continually running. The staging environment is built with 3 DigitalOcean Droplets, a MongoDB cluster and a LoadBalancer. The platform engineers will create a Crossplane Composite Resource, a Composite Resource Definition and a Composition, defining which DigitalOcean resources will be created, setting configuration options that are fixed, and deciding which configuration options, ike the image the Droplet is built from or the datacenter region where the resources are created, that the developers can change.
Once the platform engineers have put together these Crossplane resources, the only thing that the application developers need to do in order to spin up their staging environment is create a Claim and create it with
kubectl apply -f staging-env-claim.yaml
The beauty of Composite Resources is that through Composite Resource Definitions, they can be reused and changed so that if you have a resource definition for a staging environment, you can use the same composite resource and create a definition for a production environment, but give it different options like the number of the Droplets, and increase the size of your MongoDB cluster. You can even make use of different cloud providers and have your staging environment built on DigitalOcean and your production environment in another cloud.
With the v0.1.0 Release, you can now create these resources in DigitalOcean with Crossplane:
Take a look at our installation documentation which will walk you through these steps:
Both Crossplane and the DigitalOcean Crossplane Provider are open source and free for you to use. If you would like to contribute to the DigitalOcean Provider, please read the Crossplane Contributing Guidelines, and then open an issue or PR. If you build something cool with DigitalOcean and Crossplane, please let us know on Twitter, Facebook or LinkedIn!