Azure CLI
Installation
You can Install the Azure CLI on any platform, Windows or Linux (including Windows Subsystem for Linux)
Basic commands
Command | Action |
---|---|
az --version | Check the CLI version |
az --help | Display help information |
az login | Login to a specific Azure user account (will open a web page in a browser) |
az account list | List all subscriptions you have access |
az account set --subscription "xxxxx-xxxx-xxxx-xxxx-xxxxxx" | Set the current context to a specific subscription |
az account show | Display the current context |
AKS commands
Command | Action |
---|---|
az aks get-credentials --resource-group rg-xxx --name aks-xxx [--admin] | Get Kubernetes credentials for a specific cluster |
az aks browse --resource-group rg-xxx --name aks-xxx | Open Kubernetes dashboard (will open a browser) |
Recipes
az webapp config container set --name mywebappresourcename --resource-group myresourcegroup --docker-custom-image-name mycontainerregistry.azurecr.io/repositorytname:imagetag --docker-registry-server-url https://mycontainerregistry.azurecr.io --docker-registry-server-user myacruser --docker-registry-server-password myacrpassword