WHAT SHOULD A YAML FILE CONTAIN IN KEDA SCALER?

Melisa Tanrıverdi
2 min readMar 27, 2021

Specific terms you need to know for create a YAML file

If we put it all in simple terms:

Deployments: represent a set of multiple, identical Pods with no unique identities. A Deployment runs multiple replicas of your application and automatically replaces any instances that fail or become unresponsive. In this way, Deployments help ensure that one or more instances of your application are available to serve user requests. Deployments are managed by the Kubernetes Deployment controller.

ScaledObject: is a Kubernetes Custom Resource Definition (CRD). You should deploy a ScaledaObject to scale a Deployment. It defines how KEDA should scale the deployment, and it also uses it to describe the triggers.

MinReplicaCount: Minimum number of replicas KEDA will scale the resource down to. By default it’s scale to zero, but you can use it with some other value as well.

MaxReplicaCount: Maximum number of replicas KEDA will scale the resource up to. By default it’s scale to 100, but you can use it with some other value as well.

PollingInterval: This is the interval to check each trigger on. By default KEDA will check each trigger source on every ScaledObject every 30 seconds.

CoolDownPeriod: The period to wait after the last trigger reported active before scaling the resource back to 0. By default it’s 5 minutes (300 seconds). The meaning of reported active is the time at which KEDA last checked the event source and found that there were events. At that point, the trigger is set to active.

ScaleTargetRef: Tells the HPA which deployment to scale.

Triggers.type: Type specifies the scaler.

Triggers.metadata: Metadata user-defined and scaler specific, it will be passed on to the selected scaler.

Thanks for reading, I hope you found this article useful.

--

--