Azure-docs: Error with script with Azure CLI

Created on 21 May 2020  Â·  6Comments  Â·  Source: MicrosoftDocs/azure-docs

I keep getting an error when I try to create a private cluster with Azure CLI: "--vnet-subnet-id is not a valid Azure resource ID."


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri1 container-servicsvc cxp product-question triaged

All 6 comments

@jmasengesho
Thanks for your Question! We are currently investigating and will get back on this.

@jmasengesho Based on error, the reason could be wrongly mentioning the subnet ID value for
--vnet-subnet-id.
We need to pass full subnet ID for this parameter in the cli command.

For this, you can use below cli command and list the subnet in your vnet
az network vnet subnet list --resource-group <rgname> --vnet-name <vnetname> from this command output take the complete subnet ID and pass it as parameter to the az aks create command as shown in below screenshot.

image

I tried the tutorial passing full subnet id and cluster creation is successful.

Hope the provided information is helpful.

We will now close this issue. If there are further questions regarding this, please tag me in a comment. I will reopen it and we will continue the discussion.

@VikasPullagura-MSFT I still have the same issue, even when I copied or stored it in a variable. Should this subnet be empty?

I'm also having this issue. I've noticed it happens when I run the command on my local machine, but it doesn't happen in the cloud shell. At first I thought this was due to my local machine having an old version installed, but I updated the azure cli locally to match the cloud shell, and I'm still having this problem on my local machine.

Unfortunately, I can't just use the cloud shell to run the command, as the cloud shell always hits its 20 minute time out before az aks create can finish running.

I'm also having this issue. I've noticed it happens when I run the command on my local machine, but it doesn't happen in the cloud shell. At first I thought this was due to my local machine having an old version installed, but I updated the azure cli locally to match the cloud shell, and I'm still having this problem on my local machine.

Unfortunately, I can't just use the cloud shell to run the command, as the cloud shell always hits its 20 minute time out before az aks create can finish running.

Eventually I had to run my command in the Azure Shell to get it working. Later I tried it again on my local machine with the latest az cli version then it worked.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spottedmahn picture spottedmahn  Â·  3Comments

mrdfuse picture mrdfuse  Â·  3Comments

JamesDLD picture JamesDLD  Â·  3Comments

jharbieh picture jharbieh  Â·  3Comments

AronT-TLV picture AronT-TLV  Â·  3Comments