You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to add a user-managed identity to AKS kubelet but this also requires that the identity of the cluster is also user-assigned. Beside of this an additional role assignment is needed by custom role or "Managed Identity Operator" build-in-role.
The following issue results due to the fact terraform is not aware the dependency of the role assignment and ask creation. So the Process should be:
Create Managed identity
Create role assignment to clusters managed identity
Create AKS
Creation of AKS before role assignment will lead to the following issue:
Error: creating Managed Kubernetes Cluster "k8stest-test-aks-platform" (Resource Group "k8stest-test-rg-common"): containerservice.ManagedClustersClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="CustomKubeletIdentityMissingPermissionError" Message="The cluster user assigned identity must be given permission to assign kubelet identity /subscriptions/00000000-00000-00000-0000-000000000/resourceGroups/k8stest-test-rg-common/providers/Microsoft.ManagedIdentity/userAssignedIdentities/k8stest-test-msi-aks-platform-system-pool-usermsi. Check access result not allowed for action Microsoft.ManagedIdentity/userAssignedIdentities/assign/action."
│
│ with module.azure.module.aks_clusters["platform"].azurerm_kubernetes_cluster.aks,
│ on /home/vscode/.terraform/modules/azure/modules/compute/aks/aks.tf line 47, in resource "azurerm_kubernetes_cluster" "aks":
│ 47: resource "azurerm_kubernetes_cluster" "aks" {
I'm trying to add a user-managed identity to AKS kubelet but this also requires that the identity of the cluster is also user-assigned. Beside of this an additional role assignment is needed by custom role or "Managed Identity Operator" build-in-role.
The following issue results due to the fact terraform is not aware the dependency of the role assignment and ask creation. So the Process should be:
Creation of AKS before role assignment will lead to the following issue:
Example configuration:
The text was updated successfully, but these errors were encountered: