An app on AKS must call an Azure OpenAI or Storage API using its own identity. Set it up end to end.
AdvancedScenarioAKS and Containers
Answer
Situation read → Workload identity with a data-plane role on the target.
What I'd do →
az aks update -g rg -n aks --enable-oidc-issuer --enable-workload-identity(if not already)az identity create -g rg -n id-orders; grantStorage Blob Data Contributor(orCognitive Services OpenAI User) on the target- Federate:
az identity federated-credential create --identity-name id-orders -g rg --name aks-orders --issuer $(az aks show -g rg -n aks --query oidcIssuerProfile.issuerUrl -o tsv) --subject system:serviceaccount:shop:orders-sa --audiences api://AzureADTokenExchange - ServiceAccount annotated with the client ID, pod labelled
azure.workload.identity/use: "true" - Code uses
DefaultAzureCredential()
Why → No secrets, per-workload identity, works with every Azure SDK.
Interview tip → Note that changing the SA name or namespace breaks the federation subject.
More on AKS and Containers
You're asked to build a production AKS cluster. Walk through your key decisions.IntermediateA team wants to deploy a new microservice to AKS that reads a database password. How do you wire secrets?BeginnerYou need to upgrade a production AKS cluster from 1.31 to 1.33. Plan it.AdvancedPods need to scale on Service Bus queue length, not CPU. How?AdvancedYou need to run a GPU workload on an existing AKS cluster. What do you do?IntermediateA noisy application keeps starving other workloads on shared nodes. How do you fix it?Beginner