Closed SteveLasker closed 7 years ago
For clarity, this only occurs with a subscription that had not used ARM before.
You need to register services in order to use them. This should get you there:
az provider register --namespace Microsoft.Network
az provider register --namespace Microsoft.Compute
az provider register --namespace Microsoft.Storage
We should probably automatically do this in the CLI. I'll take that on.
Agreed @brendanburns. Do we really want developers having to enable/disable resources? When provisioning with an arm template, these are handled automatically. I'm sure there's some reason why this prinitive exists, but I don't believe there's value in making it that much more complicated for them to use our services.
@SteveLasker agreed, I think the CLI should auto-register for users for ACS. For the general case, we can talk about why it is this way in person sometime.
Hello I entered these commands per instructions above
az provider register --namespace Microsoft.Network
az provider register --namespace Microsoft.Compute
az provider register --namespace Microsoft.Storage
and then tried again creating the cluster (hiding private info):
az acs create --name myacscluster --resource-group myresgroup --generate-ssh-keys --orchestrator-type kubernetes
but got the following error:
Deployment failed. Correlation ID: 2096add4-bc89-4857-842e-40b2b1898dc4. { "status": "Failed", "error": { "code": "ResourceDeploymentFailure", "message": "The resource operation completed with terminal provisioning state 'Failed'.", "details": [ { "code": "InvalidResourceReference", "message": "Provisioning of resource(s) for container service 'myacscluster' in resource group 'myresgroup' failed with errors: Resource type: Microsoft.Network/virtualNetworks, name: k8s-vnet-A7456B9, id: /subscriptions/mysubguid/resourceGroups/myresgroup/providers/Microsoft.Network/virtualNetworks/k8s-vnet-A7456B9, StatusCode: BadRequest, StatusMessage: \n {\r\n \"error\": {\r\n \"code\": \"InvalidResourceReference\",\r\n \"message\": \"Resource /subscriptions/mysubguid/resourceGroups/myresgroup/providers/Microsoft.Network/networkSecurityGroups/K8S-MASTER-A7456B9-NSG referenced by resource /subscriptions/mysubguid/resourceGroups/myresgroup/providers/Microsoft.Network/virtualNetworks/k8s-vnet-A7456B9 was not found. Please make sure that the referenced resource exists, and that both resources are in the same region.\",\r\n \"details\": [\r\n {\r\n \"code\": \"NotFound\",\r\n \"message\": \"Resource /subscriptions/mysubguid/resourceGroups/myresgroup/providers/Microsoft.Network/networkSecurityGroups/K8S-MASTER-A7456B9-NSG not found.\"\r\n }\r\n ]\r\n }\r\n}\r\n" } ] } }
Could you please advise on how to solve this? I'm using azure cli version 2.0.32-1~artful on Ubuntu.
attempting to create an acs instance through the az acs create cli does not properly register microsoft.network.
However, using the portal to provision acs does the proper registrations.
Expected: az acs create does the same steps as the portal arm template for registering Microsoft.Networking and any other resources required.