kubernetes-ingress
kubernetes-ingress copied to clipboard
Add HPA
Is your feature request related to a problem? Please describe. We should allow users to set a flag to turn autoscaling on to create a basic HPA.
Describe the solution you'd like
- a setting in the controller for HPA min/max replicas, targets to scale on, and whether or not to turn it on.
- Ability to have custom metrics for the HPA since the defaults are cpu/memory. (san enhancement to the existing requirement 1. This would be a nice to have)
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered. Manually create the HPA (i do this now) but there are many downsides to managing my own.
Additional context Add any other context or screenshots about the feature request here.
Hi @akuzni2 thanks for reporting!
Be sure to check out the docs while you wait for a human to take a look at this :slightly_smiling_face:
Cheers!
can I assign this issue to myself and try to add a PR for it?
If you would like to begin the work to support HPA, I am all for it. cpu / memory should be good to begin with.
@brianehlert currently I configured one in our prod environment. Before I implement it I'd like to iron out some of the issues I'm seeing.
One issue is that scaling up/down can cause 500 errors. Do you know why that might be? Will the ingress controller not drain connections to an Nginx instance before it's scaled down? For instance if I have a deployment - with 5 pods, and choose to scale it down manually kubectl scale deploy ... --replicas=4
it appears I sometimes see 500 errors briefly. this doesn't happen on every scale but only occasionally.
I am on helm chart version 0.10.1 so that could possibly be it? That's using v nginx/nginx-ingress:1.12.1
This project is on version 2.1 I think one that I am not fully aware of is how long of a drain duration that K8s will tolerate before it kills the pods because the scale in took too long.
@brianehlert got it. I will see if I can update to latest and test again
Hi @akuzni2, we're interested in using an HPA with the controller. Any news on the 500 errors you're seeing?
same here, this feature would be really useful for us, any updates?
I believe this was addressed. https://github.com/nginxinc/kubernetes-ingress/pull/3276