Account creation → Azure CLI install → AKS tooling → authentication → final validation so you can run
an az deployment command with a Bicep file to create an Azure Resource Group / stack.
# Install Homebrew (if not installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Verify brew
brew --version
az account list.
brew update
brew install azure-cli
# Verify
az version
az --help
az.
# Confirm az is on PATH
which az
# Confirm CLI can start and list commands
az help
az is “command not found”, restart Terminal or verify Homebrew’s shell initialization.
# Opens browser login
az login
# List subscriptions
az account list --output table
# Set the one you want (use subscription id or name)
az account set --subscription "<SUBSCRIPTION_ID_OR_NAME>"
# Confirm active context
az account show --output table
You only need this section if your Bicep stack will create AKS, or if you plan to interact with AKS after deployment.
brew install kubectl
kubectl version --client
kubectl is the Kubernetes client used to query clusters, apply manifests, view pods/services, etc.
# List extensions
az extension list --output table
# Install AKS extension if needed (safe to run; it will install if missing)
az extension add --name aks-preview
# Or install the standard aks extension if preview isn't desired (often built-in, but extension may still apply)
az extension add --name aks
aks-preview only if you require preview features. Otherwise prefer stable.
az aks get-credentials -g <RG> -n <AKS_NAME>
and then validate with kubectl get nodes.
# Choose a region (example: eastus, westus2, centralus)
az account show --output table
# Create a resource group (smoke test)
az group create -n rg-aks-demo -l eastus
# Check Bicep tooling (current CLI often handles it automatically)
az bicep version
# Validate (what-if) before deploying
az deployment group what-if \
--resource-group rg-aks-demo \
--template-file main.bicep \
--parameters @main.parameters.json
# Deploy Bicep to the resource group (creates the "stack" of resources)
az deployment group create \
--name aks-demo-deploy \
--resource-group rg-aks-demo \
--template-file main.bicep \
--parameters @main.parameters.json