Skip to content

Instantly share code, notes, and snippets.

@steverhall
Created April 3, 2019 01:11
Show Gist options
  • Save steverhall/893c47094f52192288a349485d41a374 to your computer and use it in GitHub Desktop.
Save steverhall/893c47094f52192288a349485d41a374 to your computer and use it in GitHub Desktop.
Azure AKS Commands
region="EastUS"
rg="akschallenge"
#Get all versions of Kubernetes for a particular region
az aks get-versions -l $region -o table
#Get only the latest version number of Kubernetes
az aks get-versions -l ${region} --query 'orchestrators[-1].orchestratorVersion' -o tsv
#Create AKS with latest version and enable monitoring
kubernetesVersionLatest=$(az aks get-versions -l ${region} --query 'orchestrators[-1].orchestratorVersion' -o tsv)
az aks create --resource-group $rg --name <unique-aks-cluster-name> --enable-addons monitoring --kubernetes-version $kubernetesVersionLatest --generate-ssh-keys --location eastus
#Install Kubernetes CLI
az aks install-cli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment