-
Notifications
You must be signed in to change notification settings - Fork 3.5k
az aks pod-identity add fails to add role assignment #26121
Copy link
Copy link
Closed
Labels
AKSaz aks/acs/openshiftaz aks/acs/openshiftAuto-AssignAuto assign by botAuto assign by botCXP AttentionThis issue is handled by CXP team.This issue is handled by CXP team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.needs-team-attentionThis issue needs attention from Azure service team or SDK teamThis issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
AKSaz aks/acs/openshiftaz aks/acs/openshiftAuto-AssignAuto assign by botAuto assign by botCXP AttentionThis issue is handled by CXP team.This issue is handled by CXP team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.needs-team-attentionThis issue needs attention from Azure service team or SDK teamThis issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Related command
az aks pod-identity add --resource-group "xxx" --cluster-name "xxx" --namespace "xxx" --name "xxxy" --identity-resource-id "/subscriptions/xxx"
Describe the bug
With az cli 2.47.0 and the aks-preview extension 0.5.118+, the above command will fail to add the Managed Identity Operator role assignment for the AKS cluster over the managed identity. It will not report any errors, but instead will just print
Waiting for AAD role to propagateuntil the percentage reaches 100% and it gives up and printsCould not grant Managed Identity Operator permission for cluster. Running with --debug shows that GET requests are made for the AKS cluster, the managed ID and the managed ID's role assignments and then nothing else. Doing the same with az cli 2.42.0 showed a GET for the Managed Identity Operator role definition (to fetch it's ID) and then a PUT to actually assign that role over the managed ID (followed by the rest of the requests to create the pod-identity).To Reproduce
Run the above command with valid rg/cluster name etc.
Expected behavior
The pod-identity should be created.
Environment summary
core 2.47.0
telemetry 1.0.8
Extensions:
aks-preview 0.5.118
Dependencies:
msal 1.20.0
azure-mgmt-resource 22.0.0
Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\xxx.azure\cliextensions'
Python (Windows) 3.10.10 (tags/v3.10.10:aad5f6a, Feb 7 2023, 17:05:00) [MSC v.1929 32 bit (Intel)]
Additional context