Deploy services to the cluster to verify normal operation.
Delete the UAI from the Azure portal.
Re-provision the UAI by running Terraform again.
Attempt to deploy Kubernetes services to the cluster.
Current Behavior
Deployment fails with a 403 error.
Logs show that the cluster is using the old clientID of the deleted UAI.
Expected Behavior
The AKS cluster should recognize and use the newly provisioned UAI with its new clientID.
Logs
Screenshots
The ID of the new UAI
k8s service after the the UAI is reprovisioned
Possible Causes
AKS might be caching the UAI information and not updating it when the identity is re-provisioned.
There could be a delay in propagating the new UAI information to the AKS cluster.
Workaround
I have to reprovision the whole cluster when this happens.
Update: I found that rename the UAI helps the AKS rotate new UAI too.
Impact
This bug prevents the proper functioning of services that rely on the user-assigned identity, potentially causing deployment failures and service disruptions.
Environment (please complete the following information):
CLI Version [e.g. 3.22]
Kubernetes version: 1.29.7
CLI Extension version [e.g. 1.7.5] if applicable
Browser [e.g. chrome, safari] is applicable
Additional context
Add any other context about the problem here.
Description
Azure Kubernetes Service (AKS) continues to use an old managed user-assigned identity (UAI) when the identity is re-provisioned via Terraform.
Steps to Reproduce
Current Behavior
Expected Behavior
The AKS cluster should recognize and use the newly provisioned UAI with its new clientID.
Logs
Screenshots
The ID of the new UAI
k8s service after the the UAI is reprovisioned
Possible Causes
Workaround
I have to reprovision the whole cluster when this happens. Update: I found that rename the UAI helps the AKS rotate new UAI too.
Impact
This bug prevents the proper functioning of services that rely on the user-assigned identity, potentially causing deployment failures and service disruptions.
Environment (please complete the following information):
Additional context Add any other context about the problem here.