.NET Tutorial - Deploy a microservice to Azure

Create Azure resources

Create a resource group

A resource group is used to organize a set of resources related to a single app.

Run the following command to create a resource group on the West US region:

Command prompt
az group create --name myMicroserviceResources --location westus

If you want to use a different location on the previous command, you can run the following command to see which regions are available on your account and pick one closer to you:

Command prompt
az account list-locations -o table

Create an AKS cluster

Run the following command to create an AKS cluster in the resource group:

It's normal for this command to take several minutes to complete.

Command prompt
az aks create --resource-group myMicroserviceResources --name myMicroserviceCluster --node-count 1 --enable-addons http_application_routing --generate-ssh-keys

Run the following command to download the credentials to deploy to your AKS cluster:

Command prompt
az aks get-credentials --resource-group myMicroserviceResources --name myMicroserviceCluster