• As per the specified limitations of NMI (Node Managed Identity) or pod identity as you can say it, the pod identity modifies the IP tables to intercept calls to the Azure Instance Metadata endpoint
. This configuration means any request made to the Metadata endpoint is intercepted by NMI even if the pod doesn't use aad-pod-identity. Thus, as the managed identity assigned to the pod intercepts the requests made to the Azure instance metadata endpoint, you will have to configure the AzurePodIdentityException CRD
to match the labels accordingly that are defined earlier in it should be proxied without any processing in it.
• The system pods with kubernetes.azure.com/managedby: aks
label in kube-system namespace should be excluded in aad-pod-identity by configuring the AzurePodIdentityException CRD
. Hence, you should be able to differentiate and identify the requests from any pod based on the label configuration in CRD
. Also, when the pod requests a token from the IMDS endpoint
, it does not need to specify the identity, that is figured out automatically by the NMI based on the identity binding in the pod specification for the pod making the request.
For more information regarding this, I would suggest you to please refer to the below links: -
Azure Kubernetes managed identity vs AAD pod identities
https://learn.microsoft.com/en-us/azure/aks/use-managed-identity#limitations