I have a requirement to use Managed identity mechanism to access event hub from Spark streaming application running in kubernetes I am going through azure AAD pod managed identity to connect to Azure event hub and didn’t find any doc regarding event hub
Does azure AAD pod identity support accessing of event hub resource securely using azure active directory.
Can anyone provide steps/code to use event hub with AAD pod
Thanks in advance
Yes, Aad pod identity supports Azure Eventhub Connection. Here are the steps: Firstly, configure your cluster to enable managed identity. Also, this scenario is related to RBAC-disabled clusters.
az aks update -g <rg-name> -n <cluster-name> --enable-managed-identityaz aks update -g <rg-name> -n <cluster-name> --enable-pod-identity --enable-pod-identity-with-kubenetAfter this conf., you can enable aad pod identity:
kubectl apply -f https://raw.githubusercontent.com/Azure/aad-pod-identity/v1.8.13/deploy/infra/deployment.yamlkubectl apply -f https://raw.githubusercontent.com/Azure/aad-pod-identity/v1.8.13/deploy/infra/mic-exception.yamlcheck 3 pods in the default namespace are up & running —>
kubectl get pocreate aad pod identity with cli:
checked identity is assigned or not?
If your configuration is valid, Here is the java code sample:
For more details:
microsoft related page
aad pod identity related page