azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

Cannot deploy ACS - K8s in eastus

Open jsturtevant opened this issue 9 years ago • 13 comments

Description

When running

az group create --name kube-demo --location eastus
az configure --defaults group=kube-demo location=eastus
az acs create --orchestrator-type=kubernetes --name=kube-demo-cluster --dns-prefix=acs-demo-123 --generate-ssh-key

I end up with the error:

Created SSH key files: /root/.ssh/id_rsa,/root/.ssh/id_rsa.pub
creating service principaldone
waiting for AAD role to propagate......done
Deployment failed. {
  "error": {
    "code": "NoRegisteredProviderFound",
    "message": "No registered resource provider found for location 'eastus' and API version '2017-07-01' for type 'containerServices'. The supported api-versions are '2015-11-01-preview, 2016-03-30, 2016-09-30, 2017-01-31, 2017-07-01'. The supported locations are 'japaneast, centralus, eastus2, japanwest, eastasia, southcentralus, australiaeast, australiasoutheast, brazilsouth, southeastasia, westus, northcentralus, westeurope, northeurope, eastus, ukwest, uksouth, westcentralus, westus2, southindia, centralindia, westindia, canadaeast, canadacentral'."
  }
}

Both the API version and the location are listed as valid in the error message.

Environment summary

Install Method: How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly)
Answer here: Docker

docker run -it -p 8001:8001 azuresdk/azure-cli-python:latest

CLI Version: What version of the CLI and modules are installed? (Use az --version)
Answer here: bash-4.3# az --version azure-cli (2.0.13+dev)

acr (2.0.10+dev) acs (2.0.12+dev) appservice (0.1.12+dev) batch (3.1.1+dev) billing (0.1.3+dev) cdn (0.0.6+dev) cloud (2.0.7+dev) cognitiveservices (0.1.6+dev) command-modules-nspkg (2.0.1+dev) component (2.0.7+dev) configure (2.0.10+dev) consumption (0.1.3+dev) container (0.1.8+dev) core (2.0.13+dev) cosmosdb (0.1.11+dev) dla (0.0.10+dev) dls (0.0.12+dev) eventgrid (0.1.1+dev) feedback (2.0.6+dev) find (0.2.6+dev) interactive (0.3.7+dev) iot (0.1.10+dev) keyvault (2.0.8+dev) lab (0.0.9+dev) monitor (0.0.8+dev) network (2.0.12+dev) nspkg (3.0.1+dev) profile (2.0.10+dev) rdbms (0.0.5+dev) redis (0.2.7+dev) resource (2.0.12+dev) role (2.0.10+dev) sf (1.0.6+dev) sql (2.0.9+dev) storage (2.0.12+dev) taskhelp (0.1.5+dev) vm (2.0.12+dev)

Python (Linux) 3.5.2 (default, Dec 27 2016, 21:33:11) [GCC 5.3.0]

Python location '/usr/local/bin/python'

OS Version: What OS and version are you using?
Answer here: Win10 version 1703 build 15063.540

Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
Answer here: cmd.exe (with docker)

jsturtevant avatar Aug 15 '17 20:08 jsturtevant

it works if i run same with eastus2 as resource group

jsturtevant avatar Aug 15 '17 20:08 jsturtevant

eastus does not support API version 2017-07-01 yet. Are you using a nightly build to az cli? /cc: @rjtsdl

amanohar avatar Aug 15 '17 23:08 amanohar

@jsturtevant, if you are just hitting eastus, it should just work. I will take a look.

rjtsdl avatar Aug 15 '17 23:08 rjtsdl

@jsturtevant the error message could be more specific as right now it just returns the union of all API versions and regions. But for now eastus does not support '2017-07-01' API version.

amanohar avatar Aug 16 '17 00:08 amanohar

The issue here is, it shouldn't use api version 2017-07-01 at all for eastus. Btw, i can repro it. Working on investigation and fix.

rjtsdl avatar Aug 16 '17 00:08 rjtsdl

Ok Thanks. Agree the error message could be better as it lists both as acceptable messages. I was running a docker image from a month or so ago, then update to latest tag.

jsturtevant avatar Aug 16 '17 00:08 jsturtevant

@jsturtevant , looks like it was added by mistake. I need to file a PR to correct this. https://github.com/Azure/ACS/commit/4880cc9d09ed304fdc7523753111548ba41b1236

rjtsdl avatar Aug 16 '17 00:08 rjtsdl

I was able to deploy to eastus a month ago. Are you saying can no longer deploy to eastus?

jsturtevant avatar Aug 16 '17 00:08 jsturtevant

@jsturtevant, it is a bug in az cli. I am correcting it. After the fix, you should be able to deploy to eastus. The problem scope is only limited to eastus.

The change is to remove it from preview regions. Then it will be just a regular region. :)

rjtsdl avatar Aug 16 '17 00:08 rjtsdl

Great. Thanks for the fast response and clarification!

jsturtevant avatar Aug 16 '17 00:08 jsturtevant

@jsturtevant , the fix has merged.

If you use nightly build as tmr, you should see the fix effective. However, you probably need to wait for up to a month for the official release of az cli with this fix.

@tjprescott, @jsturtevant As there is nothing to do now, so you can just close this. (I don't have the permission :()

rjtsdl avatar Aug 16 '17 17:08 rjtsdl

It'll be available through our automated Docker builds also from now. The next release is scheduled for end of month.

derekbekoe avatar Aug 16 '17 17:08 derekbekoe

i am still facing this issue with nightly build (2017-09-01)

ma@Azure:~$ ~/.local/bin/az --version
azure-cli (2.0.16+1.dev20170901)
acr (2.0.11+1.dev20170901)
acs (2.0.14+1.dev20170901)
appservice (0.1.15+1.dev20170901)
batch (3.1.2+1.dev20170901)
billing (0.1.4+1.dev20170901)
cdn (0.0.7+1.dev20170901)
cloud (2.0.7+1.dev20170901)
cognitiveservices (0.1.7+1.dev20170901)
command-modules-nspkg (2.0.1+1.dev20170901)
component (2.0.7+1.dev20170901)
configure (2.0.10+1.dev20170901)
consumption (0.1.4+1.dev20170901)
container (0.1.9+1.dev20170901)
core (2.0.15+1.dev20170901)
cosmosdb (0.1.12+1.dev20170901)
dla (0.0.11+1.dev20170901)
dls (0.0.13+1.dev20170901)
eventgrid (0.1.3+1.dev20170901)
feedback (2.0.6+1.dev20170901)
find (0.2.6+1.dev20170901)
interactive (0.3.9+1.dev20170901)
ot (0.1.11+1.dev20170901)
keyvault (2.0.9+1.dev20170901)
lab (0.0.10+1.dev20170901)
monitor (0.0.9+1.dev20170901)
network (2.0.13+1.dev20170901)
nspkg (3.0.1+1.dev20170901)
profile (2.0.11+1.dev20170901)
rdbms (0.0.6+1.dev20170901)
redis (0.2.8+1.dev20170901)
resource (2.0.13+1.dev20170901)
role (2.0.11+1.dev20170901)
servicefabric (0.0.3+1.dev20170901)
sf (1.0.8+1.dev20170901)
sql (2.0.10+1.dev20170901)
storage (2.0.14+1.dev20170901)
vm (2.0.13+1.dev20170901)

Python (Linux) 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609]

Python location '/usr/bin/python'

Legal docs and information: aka.ms/AzureCliLegal

me@Azure:~$ ~/.local/bin/az acs create --orchestrator-type kubernetes --name mykube --resource-group kubepoc --admin-username kube --agent-count 8 --agent-vm-size Standard_D2_v2 --api-version 2017-07-01 -d mykube --ssh-key-value ~/.ssh/id_rsa_azure.pub --verbose
Use existing SSH public key file: /home/me/.ssh/id_rsa_azure.pub
Microsoft.Network is already registered
Microsoft.Compute is already registered
Microsoft.Storage is already registered
Waiting for AAD role to propagate
AAD role propagation done[############################################]  100.0000%AAD role propagation done
Failed: mykube (Microsoft.ContainerService/containerServices)
Accepted: azurecli1504368576.29772071317 (Microsoft.Resources/deployments)
Failed: azurecli1504368576.29772071317 (Microsoft.Resources/deployments)
Deployment failed. {
  "error": {
    "code": "NoRegisteredProviderFound",
    "message": "No registered resource provider found for location 'eastus2' and API version '2017-07-01' for type 'containerServices'. The supported api-versions are '2015-11-01-preview, 2016-03-30, 2016-09-30, 2017-01-31, 2017-07-01'. The supported locations are 'japaneast, centralus, eastus2, japanwest, eastasia, southcentralus, australiaeast, australiasoutheast, brazilsouth, southeastasia, westus, northcentralus, westeurope, northeurope, eastus, ukwest, uksouth, westcentralus, westus2, southindia, centralindia, westindia, canadaeast, canadacentral'."
  }
}

same error with location set to southindia and eastus. my current default location is eastus2


Welcome to the Azure CLI! This command will guide you through logging in and setting some default values.

Your settings can be found at /home/nagu/.azure/config
Your current configuration is as follows:

[cloud]
name = AzureCloud

[defaults]
location = eastus2

Environment variables:
AZURE_HTTP_USER_AGENT = cloud-shell/1.0

nagarajasr avatar Sep 02 '17 16:09 nagarajasr