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 →
- Enable KEDA:
az aks update -g rg -n aks --enable-keda - 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) - Create a
TriggerAuthenticationwithpodIdentity: provider: azure-workloadand the identity client ID - Create a
ScaledObjectwith anazure-servicebustrigger,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.
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.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?BeginnerYou must move an AKS workload from one cluster to a new cluster with zero downtime.Advanced