Cannot create AKS in azure with command "az aks create"

Viewed 1938

az aks create -n MyServices -g MyKubernetes --generate-ssh-keys

is not working. Error message: az aks create -n Adestis-Services -g Adestis.Kubernetes --generate-ssh-keys A Cloud Shell credential problem occurred. When you report the issue with the error below, please mention the hostname '679e170bedd7' Could not retrieve token from local cache.

Steps to reproduce: az login az account set --subscription MySubscriptionID az group create --name "MyKubernetes" --location "westus" az aks create -n MyServices -g MyKubernetes --generate-ssh-keys

5 Answers

AKS has been rolled out to East US new region. Can you please try deploying an AKS cluster in East US region?

Adding to @sauryadas_ answer, AKS is currently available in only 5 regions: East US, Central US, West Europe, Canada East and Canada Central.

to repro your issue via Bash Client, I attempted to create a new, 1 node AKS cluster on West US 2 but encountered Provisioning failed exception due to operational threshold limits - likely a capacity issue - could be the root cause of your issue given the provisioning service is down.

As a control, I created an AKS cluster on UK west and it successfully provisioned with no errors. Can you check if you are able to reproduce your issue on UK west? here's a sample cmd I used.

  1. Create Resource Group on UKwest: az group create --name myResprpUK --location ukwest
  2. Create Single node, AKS Cluster: az aks create --resource-group myResprpUK --name myAKSclusterUK --agent-count 1 --generate-ssh-keys

Hope this helps.

  1. Use bash instead of Powershell
  2. Create Resource Group in ukwest
  3. Add required ResourceProviders (Microsoft.Compute and Microsoft.Network) manually (e.g. via Azure Portal or CLI)
  4. Create AKS in this ResourceGroup

The commands used are the provided commands in the question and in answer from @Femi-Sulu. They keypoints are: - Use bash - Use region ukwest - Add ResourceProviders manually

Please read comments in answer from @Femi-Sulu!

There are 2 ways to create your cluster

Approach 1: Via bash / powershell / cmd

a) Make sure you are logged in to az account [use az login]

b) select your subscription by typing az account set --subscription <subacription-name>

c) az aks create --resource-group <your-RG-name> --name <your-cluster-name> -node-count 3 --generate-ssh-keys

Approach 2: Via portal.azure.com.

a) Search for Azure Kubernetes service on the top search bar

b) create your AKS cluster with all the options

c) Bonus here is you can also bring your cluster into your org custom VNet as well.

Related