How Do You Use AKS with the Azure CLI?

Problem scenario
You want to use Azure's PaaS for Kubernetes without using a web UI. What do you do?

Warning: this will cost money. This will create resources in Azure.

i. You have the Azure CLI installed. If you need assistance with this, see How Do You Install the Azure CLI on a Debian/Ubuntu Linux Server?

ii. Your Azure account needs to allow you to create relevant services. If you have already been hacking around in your Azure account, you are probably fine. If you want to see the details of what you need, see this external posting.

The words "contintapp" and "excellent" are arbitrary. In the examples below you can draft your own commands. Replace "excellent" with the name of your managed cluster. Replace "contintapp" wih the name of your resource group.

az group create --name contintapp --location centralus

az aks create --resource-group contintapp --name excellent --node-count 3 --node-vm-size Standard_A2_v2 --generate-ssh-keys

# The above command can take 10 minutes.

az aks show --name excellent --resource-group contintapp

az aks delete --name excellent --resource-group contintapp
# Respond with "y" to the prompt.
# It may take 10 minutes to process.

Leave a comment

Your email address will not be published. Required fields are marked *