My pods used to scale down in few seconds 20-30 but i dont know what happened now it taken 5 minute to scale down and when I added minreplica in KEDA YML file the time from 1 to 0 pods take few seconds but for n to 1 pod it take 5 minutes what I understanded that thus HPA behaviour it take the responsability of scale down from n ->1 pod and from 1->0 pod KEDA is responsible for the event I added this to scaledobject file but its being ignored
spec:
scaleTargetRef:
name: consumer-deployment
pollingInterval: 5
cooldownPeriod: 10
minReplicaCount: 0
maxReplicaCount: 5
how to reduce this time that is by default 5 minute
**Im using k8s with docker desktop **
As mentioned in the document :
Your cool down period will be dependent on pollingInterval. This is the interval to check each trigger on. By default KEDA will check each trigger source on every ScaledObject every 30 seconds. So you can minimize pollingInternal time to reduce your cool down period.
However,you can enable/disable scaling rules either by editing the replica count to 0 or you can use a single field called Pause autoscaling.
Add this below annotation to your deployment :