Getting Started with Azure Cloud Management Using Crossplane
October 31, 2024
Read time: 7 mins
Building a scalable and efficient cloud infrastructure can be complex, but getting started doesn’t have to be. Upbound’s Azure Platform Reference, powered by Crossplane, offers a straightforward starting point for managing Azure services. This reference provides you with the best practices and structure to begin your cloud journey, enabling you to customize and build from there.
This platform offers APIs for setting up fully configured AKS clusters with secure networking, stateful cloud services (Database) that can securely connect to the AKS clusters, an Observability Stack, and a GitOps System. All these components are built using cloud service tools from the Official Upbound Family Azure Provider. App deployments can securely connect to the infrastructure they need using secrets distributed directly to the app namespace.
This is the perfect place to get started and a great blueprint to guide your platform development—allowing you to iterate and scale as your needs grow.
We’ll dive into how the Azure Platform Reference not only simplifies Azure resource management but also positions your organization for a future of accelerated cloud innovation.
P.S. We have other posts that tackles the AWS Platform Reference and GCP Platform Reference in case you are looking to build with either of those as well.
Overview
This reference platform outlines a specialized API for generating an AKS cluster (XCluster) that incorporates XRs from the specified configurations:
Learn more about Composite Resources in the Crossplane Docs.
Quickstart
Pre-Requisites
Before we can install the reference platform we want to install the up
CLI. This is a utility that makes following this quickstart guide easier. Everything described here can also be done in a declarative approach which we highly recommend for any production type use-case.
To install up
run this install script:
1
See up docs for more install options.
To install crossplane
CLI follow https://docs.crossplane.io/latest/cli/#installing-the-cli
We need a running Crossplane control plane to install our instance. We are using Universal Crossplane (UXP). Ensure that your kubectl context points to the correct Kubernetes cluster or create a new kind cluster:
1
Finally install UXP into the upbound-system
namespace:
1
We will need Usages alpha feature for the correct deployment and eventual de-provisioning of this reference platform.
You can validate the install by inspecting all installed components:
1
Install the Azure Reference Platform
Now you can install this reference platform. It's packaged as a Crossplane configuration package so there is a single command to install it:
1
Validate the install by inspecting the provider and configuration packages:
1
After all Configurations are ready, you can check the status of associated Providers that were pulled as dependencies:
1
Check the marketplace for the latest version of this platform.
Configure the Azure provider
Before we can use the reference platform we need to configure it with Azure credentials:
1
Using the Azure reference platform
Congratulations. You have just installed your first Crossplane powered platform!
Application developers can now use the platform to request resources which than will provisioned in Azure. This would usually done by bundling a claim as part of the application code. In our example here we simply create the claims directly:
Create a custom defined cluster:
1
Create a custom defined database:
1
NOTE: The database abstraction relies on the cluster claim to be ready - it uses the same network to have connectivity with the AKS cluster.
Now deploy the sample application:
1
NOTE: application has a strong dependency on mariadb type of the database
You can verify status by inspecting the claims, composites and managed resources:
1
To get nice representation of the Claim deployment status you can use crossplane beta trace command:
1
To delete the provisioned resources you would simply delete the claims again:
1
To uninstall the provider & platform configuration:
1
Customize for your Organization
So far we have used the existing reference platform but haven't made any changes.
For the following examples we are using my-org
and my-platform
:
1
Pre-Requisites
First you need to create a free Upbound account to push your custom platform. Afterwards you can log in:
1
Make the changes
To make your changes clone this repository:
1
Build and push your platform
To share your new platform you need to build and distribute this package.
To build the package use the up xpkg build
command:
1
Afterwards you can push it to the marketplace. It will be not automatically listed but the OCI repository will be publicly accessible.
1
Using your custom platform
Now to use your custom platform, you can pull the Configuration package from your repository
1
For alternative declarative installation approach see the example Configuration manifest. Please update to your org, platform and tag before applying.
Congratulations. You have just build and installed your first custom Crossplane powered platform!
Best Practices for Managing Azure Infrastructure with Crossplane
Managing infrastructure in Azure requires a strategic approach to ensure scalability, security, and cost efficiency. Here are the best practices for using Upbound’s Azure Platform Reference to get the most out of your Azure cloud environment:
Modular Configuration as a Foundation
The Azure Platform Reference breaks down key services—like AKS clusters, Azure SQL databases, and VNets—into separate configurations. This modular approach provides a flexible foundation to begin building and extending your infrastructure over time. While you begin to build with these modules, keep the future in mind and what modifications may come up in order to avoid replatforming later on.
Adapt the Reference for Your Own Use Case
While the Azure Platform Reference encapsulates best practices, it’s meant to be adapted. View it as a template that you’ll customize and expand as your requirements evolve. From adding more complex networking to scaling your database architecture, this reference offers a structure, but the real power lies in how you tailor it to your needs.
Refine and Customize Over Time
As you begin building on the Azure Platform Reference, leverage Crossplane’s Compositions to make it your own. Add or remove components, tweak configurations, and use this as an iterative process to refine your platform over time.
Use GitOps for Continuous Delivery
GitOps workflows provide an ideal mechanism to continuously evolve your Azure infrastructure. By incorporating GitOps, you can version, test, and automatically apply changes to your infrastructure, making it easier to manage and improve on top of the starting template.
Security and Scaling as You Grow
The Azure Platform Reference gives you a foundation for managing key Azure services, but scaling and securing the platform is up to you. Over time, implement Azure RBAC, network security configurations, and scalability best practices. Use this reference to guide your initial efforts, then layer on more advanced security and scaling policies as you build.
Conclusion: Simplify Azure Infrastructure Management with Crossplane and Upbound
Upbound’s Azure Platform Reference serves as an excellent starting point for managing Azure cloud infrastructure. It encapsulates best practices and offers a blueprint that you can customize and build on, helping you lay the groundwork for a scalable and flexible cloud platform.
However, it’ll take much more than just this foundation to achieve the ideal robust cloud platform– something Upbound can help with.
At Upbound, our goal is to empower teams to build their own cloud management solutions. As you continue to iterate and refine, Upbound will serve as an amicable solution to streamline your journey toward greater automation, scalability, self-service, and multi-cloud flexibility. Reduce operational work to achieve more innovation. You can try it for yourself to see how it works!