3

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

Dirk Schiffner
  • 123
  • 1
  • 8

5 Answers5

2

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

sauryadas_
  • 56
  • 1
2

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

1

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.

Femi Sulu
  • 303
  • 1
  • 4
  • The most important part of your answer was "via Bash Client". Which makes sense cause Kubernetes is a Linux vehicle. But for whatever reason I tried to create it via Powershell... So now via Bash: - Creating Resource Group in ukwest --> works - Creating AKS cluster in just created Resource Group --> failed Error message: The VM size of Agent is not allowed in your subscription in location 'ukwest'. Agent VM size 'Standard_D2_v2' is available in locations: centraluseuap,eastus,eastus2,eastus2euap,southcentralus,southeastasia,westeurope,westus2. – Dirk Schiffner Nov 11 '17 at 11:19
  • Well obviously with my subscribtion I am not allowed to create the correct VM (which might be different for your subscription). – Dirk Schiffner Nov 11 '17 at 11:20
  • Next attempt: - Create the Resource Group in westeurope --> works - Create the AKS in this Resource Group -- failed! Error message: The provided location 'westeurope' is not available for resource type 'Microsoft.ContainerService/managedClusters'. List of available regions for the resource type is 'ukwest,westus2'. The only location where I am allowed to create the Resource Group AND the AKS seems to be westus2. – Dirk Schiffner Nov 11 '17 at 11:24
  • Another attempt: - Create the Resource Group again in westus2 - Create AKS in this Resource Group (this is the same command as in my very first attempt exept that I am using a bash now) --> creates service principal (good) and failed again with new error message: Deployment failed. Correlation ID: f7e5f1c5-a4c9-424d-bff9-c3ee4105c75b. Azure Container Service is unable to provision an AKS cluster in westus2, due to an operational threshold. Please try again later or use an alternate location. For more details please refer to: https://github.com/Azure/AKS/blob/master/preview_regions.md. – Dirk Schiffner Nov 11 '17 at 11:26
  • Never-Give-Up attempt: OK, westus2 has an operational problem and ukwest has a problem with my subscription - let's try another subscription and create the ResourceGroup and AKS again in ukwest: Looks better but again new error message: `Required resource provider registrations Microsoft.Compute,Microsoft.Network are missing.` Seems that I have to add the required resources manually... – Dirk Schiffner Nov 11 '17 at 11:57
  • **And Finally:** Added ResourceProviders Microsoft.Compute,Microsoft.Network manually via Azure Portal. Created AKS again in Resource Group (in ukwest). **WORKS!** – Dirk Schiffner Nov 11 '17 at 12:51
1
  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!

Thomas Kappler
  • 3,795
  • 1
  • 22
  • 21
Dirk Schiffner
  • 123
  • 1
  • 8
0

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.

iminiki
  • 2,549
  • 12
  • 35
  • 45