Monday, February 25, 2019

az CLI for Azure Kubernetes Services (AKS)

https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-windows?view=azure-cli-latest

I am installing AZ on Windows. At the end of installation, I reboot (maybe not needed...)

az login -> this opens a browser window which automatically logs you in your AKS account

in return , you get a JSON with your account details. Nice.

[
{
"cloudName": "AzureCloud",
"id": "9ab0d5c-036-495-b6d-25b05be758",
"isDefault": true,
"name": "Free Trial",
"state": "Enabled",
"tenantId": "9dc2b0-897-4b6-adf1-8c5488ea413",
"user": {
"name": "pippo.pluto@hotmail.com",
"type": "user"
}
}
]

which can be obtained also by doing

az account show


I am stingy, so I first check my billing:

az billing invoice list

NotOptedIn - You are not allowed to download invoices. Please contact your account administrator (pippo.pluto@hotmail.com) to turn on access in the management portal for allowing to download invoices through the API.




So I log into https://portal.azure.com/


Be very careful not to use the Azure Cloud Shell available in the Browser UI... using it will create a Storage Account to host a shared drive needed by the Shell, and this will reduce to 1 month the (otherwise 1 year) trial account. So, just install the AZ cli on your machine and be happy.



To display a Resource Group (RG):
az group show --name myResourceGroup

To create a RG
az group create --name myResourceGroup --location "East US"






No comments: