Azure / AKS

Azure Kubernetes Service
https://azure.github.io/AKS/
1.96k stars 306 forks source link

[BUG] AKS Using Outdated User-Assigned Identity After Terraform Re-provisioning #4561

Open quynhethereal opened 3 weeks ago

quynhethereal commented 3 weeks ago

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

  1. Use Terraform to create a User-Assigned Identity (UAI) and assign it to an AKS cluster.
  2. Deploy services to the cluster to verify normal operation.
  3. Delete the UAI from the Azure portal.
  4. Re-provision the UAI by running Terraform again.
  5. Attempt to deploy Kubernetes services to the cluster.

Current Behavior

Expected Behavior

The AKS cluster should recognize and use the newly provisioned UAI with its new clientID.

Logs

Screenshots

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.

image

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.

haitch commented 1 week ago

Thanks for open the issue, will try to repro and fix. @norshtein