Slide 1

Slide 1 text

Keda Mastering Scale-to-Zero Daniel Hasselwander Zürich, 16.05.2023 Azure Zürich User Group

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

It is Monday 10AM, now Some person leaves the house and goes to work

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

Why is this situation important for today

Slide 6

Slide 6 text

What is a good software ?

Slide 7

Slide 7 text

Doing the right things, with as little cost in operations as possible

Slide 8

Slide 8 text

Same Picture – another Situation

Slide 9

Slide 9 text

Node 1 Node 2 Node 3 Node 4

Slide 10

Slide 10 text

It is Sunday, now

Slide 11

Slide 11 text

Node 1 Node 2 Node 3 Node 4

Slide 12

Slide 12 text

What we want

Slide 13

Slide 13 text

Node 1 Node 2

Slide 14

Slide 14 text

Our Path What is Keda What we want How it works Demo

Slide 15

Slide 15 text

Who am I ?

Slide 16

Slide 16 text

Scale-To-Zero What we want ? Scale Workload on external metric 1 0 or 0 1

Slide 17

Slide 17 text

What is Keda ? − Kubernetes-based Event Driven Autoscaler − Works alongside standard components − Installable with helm − Doku on keda.sh

Slide 18

Slide 18 text

Agent – Scale to Zero activate and deactivate Deployments «keda-operator» container How it works ? KEDA Parts Metrics Server exposes event data for HPA to scale out «keda-operator-metrics- apiserver» container

Slide 19

Slide 19 text

ScaledObjects Events Deployment etc. How it works ? Custom Ressources (CRD) ScaledJobs Events Kubernetes Job TriggerAuthentication Namespace useable credentials ClusterTriggerAuthentication Cluster useable credentials

Slide 20

Slide 20 text

Demo

Slide 21

Slide 21 text

Demo 1

Slide 22

Slide 22 text

Demo 2

Slide 23

Slide 23 text

But what if my application work with http requests

Slide 24

Slide 24 text

KEDA – HTTP Scaler − An HTTP "event" is not well defined − no out-of-the-box single system that can provide an API to measure the current number of incoming HTTP events or requests. − must to be integrated into the HTTP routing system

Slide 25

Slide 25 text

KEDA – HTTP Scaler Add-On − KEDA core project has purposely not built generic HTTP-based scaling − Beta Status − Try it and give the community feedback − GitHub - kedacore/http-add-on: Add-on for KEDA to scale HTTP workloads

Slide 26

Slide 26 text

Node 1 Node 2 Node 3 Node 4

Slide 27

Slide 27 text

It is the next Sunday, now

Slide 28

Slide 28 text

Node 1 Node 2

Slide 29

Slide 29 text

KEDA – When to use it − Can be your default scale mechanism − Scale-To-Zero != Realtime − Azure Function in your Cluster

Slide 30

Slide 30 text

KEDA – Good to know − Short polling only for activate deployment − Don´t combine ScaleObject with HPA − Can use multiple scaler − Scale on your own systems − Azure CLI implement a KEDA extension for Functions

Slide 31

Slide 31 text

The Code is published on Github Hassel93/cn_meetup_keda: Repository with all used files for demo of (github.com)

Slide 32

Slide 32 text

Thank you for your attention ! Questions ?