Skip to content

Learn how to use Azure function with Kubernetes and KEDA

Notifications You must be signed in to change notification settings

sa-es-ir/AzureFunctionWithKeda

Repository files navigation

Azure Functions samples using Keda

Azure Functions: is a cloud service available on-demand which provides all the continually updated infrastructure and resources needed to run your applications. You focus on the pieces of code that matter most to you, and Functions handles the rest. Functions provides serverless compute for Azure. You can use Functions to build web APIs, respond to database changes, process IoT streams, manage message queues, and more.

KEDA: is a Kubernetes-based Event Driven Autoscaler. With KEDA, you can drive the scaling of any container in Kubernetes based on the number of events needing to be processed.

Specification

Framework Version
.Net net6.0
AzureFunctions v4
Keda 2.0

In this repo, I've tried to solve some common issues on Azure Functions developing and deploying using Kubernetes and Keda.

Common issues

  • Use appsetting.json
  • Use Dependency injection in startup
  • Map request body in the HttpTrigger and DurableFunction
  • Create YAML file for Keda based on the azure function types

Pre-requisites

Install KEDA

Follow the instructions to deploy KEDA in your cluster.

To confirm that KEDA has successfully installed you can run the following command and should see the following CRD.

kubectl get customresourcedefinition
NAME                     AGE
scaledobjects.keda.sh    2h
scaledjobs.keda.sh       2h

Azure Functions guidelines

ToDos

  • Add other Azure function types (don't hesitate if you want to contribute and add other functions)

About

Learn how to use Azure function with Kubernetes and KEDA

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages