Skip to content

unrecognized authorization error k8s-extension #25654

@danielvargasbm

Description

@danielvargasbm

Related command

az k8s-extension create

Describe the bug

I am trying to install AzureML extensions to AKS using this URL.
https://learn.microsoft.com/en-us/azure/machine-learning/how-to-deploy-kubernetes-extension?tabs=deploy-extension-with-cli#azure-machine-learning-extension-deployment---cli-examples-and-azure-portal

I get however this error,

Error Message
Request failed to https://management.azure.com/subscriptions/<SUBSCRIPTION>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.ContainerService/managedclusters/<CLUSTER_NAME>/extensionaddons/test-extention?api-version=2021-03-01. Error code: Forbidden. Reason: Forbidden.{"error":{"code":"AuthorizationFailed","message":"The client '<CLIENT_ID>' with object id '<CLIENT_ID>' does not have authorization to perform action 'Microsoft.ContainerService/managedclusters/extensionaddons/read' over scope '/subscriptions/<SUBSCRIPTION>/resourceGroups/<RESOURCE GROUP>/providers/Microsoft.ContainerService/managedclusters/test-cluster/extensionaddons/azureml' or the scope is invalid. If access was recently granted, please refresh your credentials."}}

To Reproduce

Run
az extension update -n k8s-extension
az k8s-extension create --name azureml --extension-type Microsoft.AzureML.Kubernetes --cluster-name CLUSTER_NAME --resource-group RESOURCE_GROUP --cluster-type managedClusters --config enableTraining=True enableInference=True allowInsecureConnections=True inferenceRouterServiceType=LoadBalancer inferenceRouterHA=False

Expected behavior
Install the azureml extension

Environment summary

az version                                                                                                                                                                                            ─╯
{
  "azure-cli": "2.45.0",
  "azure-cli-core": "2.45.0",
  "azure-cli-telemetry": "1.0.8",
  "extensions": {
    "account": "0.2.5",
    "aks-preview": "0.5.131",
    "azure-devops": "0.26.0",
    "k8s-extension": "1.4.0",
  }
}

Additional context

Related existing issue: Azure/azure-cli-extensions#5144
But created one here as this one is for v2

Metadata

Metadata

Labels

AKSaz aks/acs/openshiftAuto-AssignAuto assign by botCXP AttentionThis issue is handled by CXP team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-author-feedbackMore information is needed from author to address the issue.no-recent-activityThere has been no recent activity on this issue.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions