Interview Prep/Azure/AKS and Containers

Pods need to scale on Service Bus queue length, not CPU. How?

AdvancedScenarioAKS and Containers
Answer

Situation read → KEDA, via the AKS add-on, with workload identity to read queue metrics.

What I'd do →

  1. Enable KEDA: az aks update -g rg -n aks --enable-keda
  2. Give a user-assigned identity Azure Service Bus Data Owner (needed to read message counts) on the namespace, federate it to the KEDA operator service account (system:serviceaccount:kube-system:keda-operator)
  3. Create a TriggerAuthentication with podIdentity: provider: azure-workload and the identity client ID
  4. Create a ScaledObject with an azure-servicebus trigger, queueName, messageCount: "50", minReplicaCount: 0

Why → Workers scale with backlog, including down to zero, which saves cost on idle queues.

Interview tip → Mention KEDA creates an HPA under the hood; don't define your own HPA on the same deployment.

Azure All Azure questions Roadmap: AKS & Azure DevOps

More on AKS and Containers