Open gsxmax opened 11 months ago
I beleive it is related to this code https://github.com/Azure/azure-powershell/blob/main/src/Aks/Aks/Commands/SetAzureRmAks.cs#L389, it would only check SP and work on AKS clusters using SP.
Thanks for reporting. @Nickcandy can you check with @wyunchi-ms and propose a fix? Thanks.
Description
When using powershell command to attach the ACR for AKS cluster which are using managed identity, it would not work. It would try to find the SP in local enviorment first, if not exist, it would try to create a new one. However, actually it should grant the "ACRpull" role to the kubelet identity of the AKS cluster.
Issue script & Debug output
Environment data
Module versions
Error output