News for hackers. Stuff that matters.

Kubernetes Pod Autoscaling in practice

I am curious to hear people's/companies' experiences using Kubernetes Pod Autoscaling (primarily thinking of Horizontal Pod Autoscaling, but also interested to hear if/how people use Vertical Pod Autoscaling).

When I Google around, I find lots of blog posts of the form "here is how to set up k8s autoscaling based on CPU utilization/custom metrics..." but I don't find much of the form "here is my/my company's experience actually deploying k8s autoscaling in the real world..."

What metrics do you use to autoscale? How do you select/set the autoscaling parameters for your real-world deployments? Are you happy with the experience? Are there any pathological cases/issues you frequently run into?

( 3 comments | 2 points | on HN )
Re:Kubernetes Pod Autoscaling in practice by JoeriBe on Thursday July 18, 2024 @04:54AM (#40993758)
Re:Kubernetes Pod Autoscaling in practice by verdverm on Thursday July 18, 2024 @04:53AM (#40993748)
Like most things, these are company/workload specific, so...

1. You need good observability

2. You'll need a cluster autoscaler, that's really where it the rubber meets the road, especially for utilization / cost controls

3. Use multiple node pools for different classes of workloads

4. Workload scaling metrics will be application specific

Re:Kubernetes Pod Autoscaling in practice by 8b16380d on Thursday July 18, 2024 @12:23PM (#40997186)
We horizontally scale on queue depth/length (Kafka offset length specifically)

This requires the use of things like kubernetes custom metrics api and Prometheus adapter