Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

DevOps Fest 2020. Erwin Staal. Event-driven autoscaling on Kubernetes with KEDA and Azure Functions

16 views

Published on

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.

Published in: Education
  • Be the first to comment

DevOps Fest 2020. Erwin Staal. Event-driven autoscaling on Kubernetes with KEDA and Azure Functions

  1. 1. Kubernetes-based Event Driven Autoscaling Erwin Staal | @erwin_staal
  2. 2. Kubernetes-based Event Driven Autoscaling Event-driven Autoscaling Made Simple Built-in Scalers
  3. 3. @erwin_staal About me Erwin Staal Software engineer DevOps Consultant
  4. 4. @erwin_staal Containers? A lightweight, stand-alone, executable package of • Code • Runtime • System tools • System libraries • Settings • …
  5. 5. @erwin_staal Kubernetes in 5 minutes WorkerK MasterAPI application.yaml WorkerK WorkerK P1-r1 P1-r2 P1-r3 kind: Deployment spec: template: spec: containers: - name: grafana image: grafana/grafana ports: - containerPort: 3000 replicas: 3
  6. 6. @erwin_staal Scaling Horizontal Vertical
  7. 7. @erwin_staal Autoscaling in Kubernetes Nodes Pods Horizontal # of nodes # of pods Vertical size of node size of pod
  8. 8. @erwin_staal Kubernetes Event-Driven Autoscaling • 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
  9. 9. @erwin_staal Scalers AWS Kinesis Stream Apache Kafka Topic AWS Cloudwatch AWS SQS Queue Azure Blob Storage Azure Event Hubs Azure Service Bus Azure Storage Queue External Google Cloud Platform Pub/Sub Huawei Cloudeye Liiklus Topic NATS Streaming RabbitMQ Queue Prometheus Redis Lists
  10. 10. @erwin_staal
  11. 11. @erwin_staal AKS + Virtual nodes Azure Kubernetes Services Azure Container instances
  12. 12. @erwin_staal K3s and K3d? • K3s - 5 less than K8s • Flannel • CoreDNS • Traefik • SQLite • Containerd “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.”
  13. 13. @erwin_staal DEMO
  14. 14. @erwin_staal Horizontal Pod Autoscaler (HPA) Scrapes metrics Scales Metrics Polls App
  15. 15. @erwin_staal Thanks! Erwin Staal erwins@4dotnet.nl @erwin_staal

×