Join us

How to Provision Azure Resources using Crossplane

0_58dO-gz-jQtlmPMx.png

In our last post we have seen about Crossplane and its benefits. In this article, lets check how to provision an azure resource using Crossplane.

What is Crossplane?

Crossplane is a tool created by Upbound which has been released in December of 2018. It has been accepted as an incubating project by the CNCF (Cloud Native Computing Foundation) in 2020.

Crossplane is developed as a Kubernetes add-on and extends any Kubernetes cluster with the flexibility to provision and manage cloud infrastructure, services, and applications. Crossplane uses Kubernetes-styled declarative and API-driven configuration and management of infrastructure, on-premises or within the cloud.

Crossplane can be considered as a Kubernetes add-on, which means that it makes use of custom resources to provide all of its functionality. There are 4 kinds of resources,

Let’s go over the steps to install Crossplane on an existing Kubernetes cluster and install and configure Crossplane to provision Azure resources.

Prerequisites:

Install Crossplane

To install the Crossplane core components on the cluster using Helm, You can use separate namespace to install the Crossplane component, as below.

Verify the installation is complete by running the following commands:

Crossplane CLI:

You can use following commands to install Crossplane CLI.

Configure Azure provider

We have successfully installed the Crossplane and its CLI. Now, let’s see how we can create the resources on Azure cloud. For that we need to configure the Crossplane’s Azure provider on the cluster. Please note, before we starting configuration, we need a service principal in Azure, which will used by our Crossplane Azure provider uses to provision a resource.

Here are the commands you can use to add the create a service principle.

For more details, please refer Crossplane documentation .

Once the service principle has been created, you need to create Kubernetes secret for azure authentication.

Install the Crossplane Azure provider, and supply the configuration that includes the secret that was created above for Azure authentication. Here it the file name az-provider.yaml.

The first manifest instructs Crossplane to download and make the Azure provider available. The second manifest creates the ProviderConfig for the Azure provider.

Apply the above manifest with kubectl:

Once the manifest is applied, wait until the Azure provider installs and is in a healthy state.


Only registered users can post comments. Please, login or signup.

Start blogging about your favorite technologies, reach more readers and earn rewards!

Join other developers and claim your FAUN account now!

Avatar

We are Foxutech

@foxutech
#devops #docker #github #rundeck #nagios #linux #containers #kubernetes #terraform #ansible #saltstack #security #automation #microservices #gitops #argocd #crossplane #prometheus
User Popularity
176

Influence

16k

Total Hits

11

Posts