Creating a KEDA Scaler for Azure Container Apps (ACA) using Azure Portal

Use KEDA within Azure Container Apps to dynamically scale Azure DevOps agents

Utkarsh Shigihalli
4 min readFeb 22, 2024

We run our Azure DevOps Build agents inside a container. This has allowed us to package various tools like kubectl , helm and terraform packaged inside the agent image, which gives us control over versions of the tools we use — as we can execute our continuous integrations with consistent configuration. Also, adding any new tool is just adding installation instructions to the Dockerfile and publishing a new image.

Microsoft has a detailed documentation on running Azure DevOps agent inside a container here

Further, we are running our agents as an Azure Container App, which has freed us from maintaining a dedicated AKS cluster and lets us dynamically scale the agents — a new agent per pipeline job with the help of custom scaling rules and KEDA.

In this post, I would like to show you how we added custom scaling with KEDA using the Azure Portal — Thanks to the KEDA scaler, we have a dynamic scaling pool, which automatically scales when there are more jobs in the queue and scales back down when demand reduces.

Creating an Azure Container App

Creating an Azure Container App can be done in a variety of ways — Terraform or any other IaC code, Azure CLI or through Portal. We are using Terraform internally, but for the sake…



Utkarsh Shigihalli

Microsoft MVP | Developer | Passionate about Cloud, .NET and DevOps