Hi i want to scale to 0 some HPAs in AKS, i know t...
# kubernetes
m
Hi i want to scale to 0 some HPAs in AKS, i know that this can be done adding some parameters to the kubelet
Copy code
--feature-gates="HPAScaleToZero=true"
Can this be done in AKS does someone have an example?
BTW i am creating the AKS with TF
t
What's the end goal? Are you just wanting to manually scale when appropriate? Or are you wanting something that's event driven like what KEDA provides?
m
The idea is to completely stop the MS that are not being used in lower environments and also reduce the amount of nodes required by the solution
t
Yes, most scale to 0 solutions are to save resources. I'm still not exactly sure what you mean, but I imagine you're really looking for something like this: https://github.com/GBuenaflor/01azure-aks-keda
m
i would like to have 0 pods running of a MS until someone calls it in lower environmets (like a Serverless solution)
t
This is literally what KEDA does, and AKS has some really easy plugins for it
m
Great thanks i will investigate a bit
Thanks!!!
t
There will be a KEDA pod that will be running and looking at whatever you decide is the trigger, DB SQL query, Rabbit MQ, Azure Message Bus, etc. (you need something capable of being called)... but its really light weight and AKS's business model requires at least one node running at all times, so just stick it on there. Also, don't forget that AKS can use an app service as a node pool and you can run your MS there and avoid some of the time it takes to spin up a real node to run the workload.
m
Great thanks