Open mmindenhall opened 5 years ago
Hi @mmindenhall,
In this case what we do is leverage the Kubernetes Horizontal Pod Autoscale: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
When you delete an autoscaler there is no way to know the original value for the number of replicas that a Deployment
had (because it may be more than one). That's why the deployment is left with the number of replicas that it has at that moment.
If after deleting the autoscaler you want to set a fix number of replicas you can also execute:
kubectl scale --replicas 1 deployment my-func
Is this a BUG REPORT or FEATURE REQUEST?:
Bug.
What happened:
I created a bunch of instances of a function to do some benchmarking:
This scaled up to 20 pods, and I completed my benchmarking.
Then, I deleted the autoscale rule:
About 30 minutes later, all 20 pods were still running. In order to bring this back down to a single pod, I had to:
$ kubeless autoscale create my-func --min 1 --max 1 --metric cpu --value 20
$ kubeless autoscale delete my-func
What you expected to happen:
When an autoscale rule is deleted, any additional scaled pods should be removed.
How to reproduce it (as minimally and precisely as possible):
See above.
Anything else we need to know?:
Environment:
kubectl version
): 1.12kubeless version
): v1.0.0