what is the best way to use managed identities feature for AKS cluster?

4/4/2020

through my testing some new features for AKS clusters i want to enable managed identities feature for my azure k8s cluster, can anyone just simply tell me what the main benefit to use this ? and do i need in this way an externel DNS zone ?

-- jorg-m
azure-aks
azure-managed-identity
dns
kubernetes
rbac

1 Answer

4/4/2020

Currently, an Azure Kubernetes Service (AKS) cluster (specifically, the Kubernetes cloud provider) requires a service principal to create additional resources like load balancers and managed disks in Azure. Either you must provide a service principal or AKS creates one on your behalf. Service principals typically have an expiration date. Clusters eventually reach a state in which the service principal must be renewed to keep the cluster working. Managing service principals adds complexity.

Managed identities are essentially a wrapper around service principals, and make their management simpler. To learn more, read about managed identities for Azure resources.

AKS creates two managed identities:

System-assigned managed identity: The identity that the Kubernetes cloud provider uses to create Azure resources on behalf of the user. The life cycle of the system-assigned identity is tied to that of the cluster. The identity is deleted when the cluster is deleted. User-assigned managed identity: The identity that's used for authorization in the cluster. For example, the user-assigned identity is used to authorize AKS to use Azure Container Registries (ACRs), or to authorize the kubelet to get metadata from Azure. Add-ons also authenticate using a managed identity. For each add-on, a managed identity is created by AKS and lasts for the life of the add-on. For creating and using your own VNet, static IP address, or attached Azure disk where the resources are outside of the MC_* resource group, use the PrincipalID of the cluster to perform a role assignment. For more information on role assignment, see Delegate access to other Azure resources.

in short - to ease management

-- 4c74356b41
Source: StackOverflow