Deploying Azure Database for MySQL using ASO
In the previous section, you deployed ASO on your Kubernetes cluster. This means that now you can use the Kubernetes API to deploy Azure resources. In this section, you will create a MySQL database running on the Azure Database for MySQL service using YAML files that you will submit to Kubernetes using kubectl
. Let's get started:
- First, you need to create a resource group. The code for the resource group definition is also available in the code samples with this chapter. Create this file and save it as
rg.yaml
:apiVersion: azure.microsoft.com/v1alpha1 kind: ResourceGroup metadata: Â Â name: aso-resources spec: Â Â location: <cluster location>
As you can see in the code for the resource,
apiVersion
refers toazure.microsoft.com
andkind
isResourceGroup
. Furthermore, you provide the details for the resource group, being its name and its location. Make sure to changelocation
to the location of your cluster...