Azure-docs: Missing step to register Microsoft.ContainerInstance provider

Created on 6 Dec 2018  Â·  12Comments  Â·  Source: MicrosoftDocs/azure-docs

I could not get the sample Pod to run (status was showing ProviderFailed) untik I ran this command:

az provider register --namespace Microsoft.ContainerInstance


Document Details

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

container-servicsvc cxp in-progress product-question triaged

Most helpful comment

@sujitdmello PMs have confirmed that yes, provider does need manually registering if you haven't previously used Azure Container Instances. I'll update the docs.

@cwoolum You may be experiencing something a little different if you have successfully registered the provider. Can you verify registration with az provider list -o table and check _Microsoft.ContainerInstance_. @MicahMcKittrick-MSFT Can help get you additional troubleshooting assistance outside of reporting doc issues as needed.

All 12 comments

@sujitdmello thanks for the feedback. If you use the Azure Cloud Shell to deploy these preview features the providers are already registered for you. But if running on prem you would need to register them before it would work.

I will assign to the author to review and see if we can add a note to the doc.

@sujitdmello What version of the CLI are you running?

@rbitia @jluk Shouldn't the provider already be registered for some time in CLI releases? We haven't typically needed to include this in docs for a while now.

azure-cli (2.0.52)

Just updated it this morning.

I am getting ProviderFailed even after registering the provider.

Logs for the pod show

Internal error occurred: error getting container logs?): api call to https://management.azure.com/subscriptions/319a5078-be7b-4d09-be02-75ebcd9b0d0c/resourceGroups/MC_rg-api-staging_kube-api-staging_westus2/providers/Microsoft.ContainerInstance/containerGroups/default-aci-helloworld-cf9484987-phg6m?api-version=2018-09-01: got HTTP response status code 404 error code "ResourceNotFound": The Resource 'Microsoft.ContainerInstance/containerGroups/default-aci-helloworld-cf9484987-phg6m' under resource group 'MC_rg-api-staging_kube-api-staging_westus2' was not found.

Logs for aci-connector-linux` show:

time="2018-12-14T08:38:29Z" level=info msg="Registered node" namespace= node=virtual-node-aci-linux operatingSystem=Linux provider=azure
time="2018-12-14T08:38:29Z" level=info msg="starting workers" namespace= node=virtual-node-aci-linux operatingSystem=Linux provider=azure
time="2018-12-14T08:38:29Z" level=info msg="started workers" namespace= node=virtual-node-aci-linux operatingSystem=Linux provider=azure
time="2018-12-14T08:40:30Z" level=warning msg="requeuing \"default/aci-helloworld-cf9484987-phg6m\" due to failed sync" namespace= node=virtual-node-aci-linux operatingSystem=Linux provider=azure
time="2018-12-14T08:40:30Z" level=warning msg="requeuing \"default/aci-helloworld-cf9484987-phg6m\" due to failed sync" namespace= node=virtual-node-aci-linux operatingSystem=Linux provider=azure
time="2018-12-14T08:40:30Z" level=warning msg="requeuing \"default/aci-helloworld-cf9484987-phg6m\" due to failed sync" namespace= node=virtual-node-aci-linux operatingSystem=Linux provider=azure
time="2018-12-14T08:40:30Z" level=warning msg="requeuing \"default/aci-helloworld-cf9484987-phg6m\" due to failed sync" namespace= node=virtual-node-aci-linux operatingSystem=Linux provider=azure
time="2018-12-14T08:40:31Z" level=warning msg="requeuing \"default/aci-helloworld-cf9484987-phg6m\" due to failed sync" namespace= node=virtual-node-aci-linux operatingSystem=Linux provider=azure
time="2018-12-14T08:40:31Z" level=warning msg="requeuing \"default/aci-helloworld-cf9484987-phg6m\" due to failed sync" namespace= node=virtual-node-aci-linux operatingSystem=Linux provider=azure
time="2018-12-14T08:40:31Z" level=warning msg="requeuing \"default/aci-helloworld-cf9484987-phg6m\" due to failed sync" namespace= node=virtual-node-aci-linux operatingSystem=Linux provider=azure
time="2018-12-14T08:40:32Z" level=warning msg="requeuing \"default/aci-helloworld-cf9484987-phg6m\" due to failed sync" namespace= node=virtual-node-aci-linux operatingSystem=Linux provider=azure
time="2018-12-14T08:40:33Z" level=warning msg="requeuing \"default/aci-helloworld-cf9484987-phg6m\" due to failed sync" namespace= node=virtual-node-aci-linux operatingSystem=Linux provider=azure
time="2018-12-14T08:40:36Z" level=warning msg="requeuing \"default/aci-helloworld-cf9484987-phg6m\" due to failed sync" namespace= node=virtual-node-aci-linux operatingSystem=Linux provider=azure
time="2018-12-14T08:40:41Z" level=warning msg="requeuing \"default/aci-helloworld-cf9484987-phg6m\" due to failed sync" namespace= node=virtual-node-aci-linux operatingSystem=Linux provider=azure
time="2018-12-14T08:40:52Z" level=warning msg="requeuing \"default/aci-helloworld-cf9484987-phg6m\" due to failed sync" namespace= node=virtual-node-aci-linux operatingSystem=Linux provider=azure
time="2018-12-14T08:41:12Z" level=warning msg="requeuing \"default/aci-helloworld-cf9484987-phg6m\" due to failed sync" namespace= node=virtual-node-aci-linux operatingSystem=Linux provider=azure
time="2018-12-14T08:41:54Z" level=warning msg="requeuing \"default/aci-helloworld-cf9484987-phg6m\" due to failed sync" namespace= node=virtual-node-aci-linux operatingSystem=Linux provider=azure
time="2018-12-14T08:43:15Z" level=error msg="Internal server error on request" error="error getting container logs?): api call to https://management.azure.com/subscriptions/319a5078-be7b-4d09-be02-75ebcd9b6d0c/resourceGroups/MC_api-staging_api-staging_westus2/providers/Microsoft.ContainerInstance/containerGroups/default-aci-helloworld-cf9484987-phg6m?api-version=2018-09-01: got HTTP response status code 404 error code \"ResourceNotFound\": The Resource 'Microsoft.ContainerInstance/containerGroups/default-aci-helloworld-cf9484987-phg6m' under resource group 'MC_api-staging_api-staging_westus2' was not found." httpStatusCode=500 namespace= node=virtual-node-aci-linux operatingSystem=Linux provider=azure uri="/containerLogs/default/aci-helloworld-cf9484987-phg6m/aci-helloworld?tailLines=5000&timestamps=true" vars="map[]"
time="2018-12-14T08:43:16Z" level=warning msg="requeuing \"default/aci-helloworld-cf9484987-phg6m\" due to failed sync" namespace= node=virtual-node-aci-linux operatingSystem=Linux provider=azure
time="2018-12-14T08:43:43Z" level=error msg="Internal server error on request" error="error getting container logs?): api call to https://management.azure.com/subscriptions/319a5078-be7b-4d09-be02-75ebcd9b6d0c/resourceGroups/MC_api-staging_api-staging_westus2/providers/Microsoft.ContainerInstance/containerGroups/default-aci-helloworld-cf9484987-phg5m?api-version=2018-09-01: got HTTP response status code 404 error code \"ResourceNotFound\": The Resource 'Microsoft.ContainerInstance/containerGroups/default-aci-helloworld-cf9484987-phg5m' under resource group 'MC_api-staging_api-staging_westus2' was not found." httpStatusCode=500 namespace= node=virtual-node-aci-linux operatingSystem=Linux provider=azure uri="/containerLogs/default/aci-helloworld-cf9484987-phg6m/aci-helloworld?tailLines=5000&timestamps=true" vars="map[]"

I've tried to remove and reinstall the addon but that didn't work.

@sujitdmello PMs have confirmed that yes, provider does need manually registering if you haven't previously used Azure Container Instances. I'll update the docs.

@cwoolum You may be experiencing something a little different if you have successfully registered the provider. Can you verify registration with az provider list -o table and check _Microsoft.ContainerInstance_. @MicahMcKittrick-MSFT Can help get you additional troubleshooting assistance outside of reporting doc issues as needed.

I am showing that it is successfully registered when I run that. @MicahMcKittrick-MSFT, do you have any recommendations for how to proceed?

@sujitdmello can you tell me if you are the subscription admin?

Yes

@sujitdmello sorry meant to @cwoolum :)

@cwoolum can you tell me if you are the subscription admin?

@MicahMcKittrick-MSFT Yes, I am

@cwoolum thanks for that.

I am not getting the errors you are seeing so I would suggest the following

Remove all AKS resources. This includes the AKS cluster and the resource group labeled MC_*. That way you have a clear slate. After doing that try the steps again. If you get the same error as before then it would seem it is something specific with your subscription.

If that is the case, you can email me at [email protected] and provide me with you SubscriptionID and link to this issue and I can get you in touch with a support engineer to take a look at the backend and figure out what is happening.

@cwoolum I will close this for now but please see my above comment. If still seeing issues send me an email and we can get it sorted out offline :)

Was this page helpful?
0 / 5 - 0 ratings