Azure Functions running on Kubernetes using Keda

What’s Keda?

Great, but how does it works?


  1. First of all, we need an Azure Subscription to create our AKS and the Azure ServiceBus. The free-trial it’s just great for create it.
  2. We gonna use the Azure Functions Core Tools for create, start and run our functions.
  3. Install Docker and a DockerHub account is essential.
  4. Kubectl to watch the beauty babies getting up.
  5. A repository on Github, Gitlab, Azure DevOps repos,…
  6. It’s not a must. But if you want to deploy it using the Azure pipeline from the example, you need to log in the Azure DevOps and run the pipeline. But if you have another CI/CD pipeline or want to deploy in a different way, it’s fair enough too.

Let’s start!!

Starting a function

func init . --docker
Select a number for worker runtime:
1. dotnet
2. node
3. python
4. powershell
5. custom
Choose option:

Creating a function

func new
Select a number for template:
1. Azure Blob Storage trigger
2. Azure Cosmos DB trigger
3. Durable Functions activity
4. Durable Functions HTTP starter
5. Durable Functions orchestrator
6. Azure Event Grid trigger
7. Azure Event Hub trigger
8. HTTP trigger
9. Azure Queue Storage trigger
10. RabbitMQ trigger
11. Azure Service Bus Queue trigger
12. Azure Service Bus Topic trigger
13. Timer trigger
Choose option:
Azure Service Bus Queue trigger
Function name: [ServiceBusQueueTrigger]

Testing it locally

func start
export AzureWebJobsStorage='<service-bus-connection>'
export QUEUE_NAME=<queue-name>

Manifests files and deploy pipeline

Configuring Azure DevOps and Deploying to AKS

kubectl get pods -n <your-name-space>
kubectl get pods -n <your-name-space>



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Arthur Ávila

Arthur Ávila

Python Dev | DevOps and cool stuffs lover