Scaling Kubernetes Pods with External Metrics

Most workloads I’ve seen are IO bound and not CPU/memory bound.

Kubernetes’s horizontal pod autoscaler (HPA) can only scale based on CPU and memory via its built-in metrics.

However, using Prometheus/Grafana or Datadog, you can set your HPAs to scale your workloads off any external metric you want.

For example, you might want to increase your API service’s pods when the average response time is above a certain threshold.

Here are links to a blog post detailing how to set up scaling with Prometheus metrics and Datadog’s documentation on scaling with their metrics.


Master GitHub Actions with a Senior Infrastructure Engineer

As a senior staff infrastructure engineer, I share exclusive, behind-the-scenes insights that you won't find anywhere else. Get the strategies and techniques I've used to save companies $500k in CI costs and transform teams with GitOps best practices—delivered straight to your inbox.

Not sure yet? Check out the archive.

Unsubscribe at any time.