Simulate the HPAScaleToZero feature gate, especially for managed Kubernetes clusters, as they don't usually support non-stable feature gates.
kube-hpa-scale-to-zero
scales down to zero
workloads instrumented by HPA when the current
value of the used custom metric is zero
and resuscitates them when needed.
If you're also tired of (big) Pods (thus Nodes) that are only used 3 hours a day, give this a try ;)
Check the code and comments in main.py for more details.
python main.py --hpa-label-selector foo=bar,bar=foo --hpa-namespace foo
or
python main.py --help
Needs Python >=3.10
Docker images are published here.
A Helm chart is also available here.
helm upgrade --install RELEASE_NAME helm-chart/ -n RELEASE_NAMESPACE