DevOps Fest 2020. Erwin Staal. Event-driven autoscaling on Kubernetes with KEDA and Azure Functions
Event-driven, serverless architectures are a hot topic in today’s cloud-native application development. To take full advantage of the serverless benefits of event driven, your application needs to scale and react to those events instantly. It needs to be able to scale from zero to potentially thousands of instances. KEDA is an open sourced component that provides event driven autoscaling for your Kubernetes workloads. KEDA works with any container, but to enable additional serverless capabilities within Kubernetes you can pair KEDA with the Azure Functions runtime. Azure Functions provides a programming model that can run anywhere: in a container running on-premises, fully managed in Azure, or in any Kubernetes cluster. It allows application developers not to worry anymore about writing the code to connect, trigger, and pull from an event source like RabbitMQ, Kafka, or Azure Event Hubs. That’s all handled for you. In this demo-filled session, we will start with a quick introduction on both Kubernetes and Azure Functions. You will then see how you can create your first cluster and install KEDA, deploy a function and scale that to thousands of instances based on events.
Autoscaling in Kubernetes
Horizontal # of nodes # of pods
Vertical size of node size of pod
• Install into any cluster
• Extensible and pluggable scalers to grab metrics from any event source
• Monitors the rate of events to proactively scale any container
• Feeds the data into the Kubernetes APIs to drive scaling
• Allows containers to scale to and from zero
• It is up to the deployment to consume the events from source
K3s and K3d?
• K3s - 5 less than K8s
“k3d is a utility designed to easily run k3s in Docker, it provides a simple CLI to
create, run, delete a full compliance Kubernetes cluster
with 0 to n worker nodes.”