DevOps

Kubernetes HPA Generator

Generate a Kubernetes HorizontalPodAutoscaler manifest in YAML to automatically scale a deployment based on CPU utilization.

Last reviewed by the Radiatus Cloud team

Generate a Kubernetes HPA YAML to autoscale a deployment on CPU.

Want this automated for your stack?

We build CI/CD, Kubernetes & IaC pipelines that scale.

Talk to an engineer

Generate a HorizontalPodAutoscaler

A HorizontalPodAutoscaler, or HPA, automatically adjusts the number of pod replicas in a deployment based on observed load, scaling up under heavy demand and down when it eases. This generator produces an HPA manifest using the current autoscaling API version. You specify the target deployment, the minimum and maximum replica counts, and a target average CPU utilisation, and the tool creates a manifest that keeps CPU usage near your target by changing the replica count.

For example, targeting seventy percent CPU means the autoscaler adds pods when average CPU rises above that and removes them when it falls below.

Automatic scaling

Autoscaling helps applications handle variable traffic efficiently, maintaining performance during spikes without permanently over-provisioning. The HPA requires the metrics server to be installed so it can read CPU usage, and the target deployment must declare CPU resource requests, since utilisation is measured relative to the request. Setting sensible minimum and maximum bounds prevents scaling to zero or runaway scaling.

This manifest scales on CPU; the autoscaling API also supports memory and custom metrics for more advanced setups. Review the manifest and apply it. All generation happens locally in your browser.

Related tools

Frequently Asked Questions

What does an HPA do?

It automatically changes the number of pod replicas based on load, scaling up under demand and down when it subsides.

What is required for CPU autoscaling?

The metrics server must be installed, and the target deployment must set CPU resource requests, since utilisation is measured against the request.

Why set min and max replicas?

The bounds prevent the autoscaler from scaling too low, risking availability, or too high, risking cost and resource exhaustion.

Can it scale on more than CPU?

Yes. The autoscaling API also supports memory and custom metrics, though this generator targets CPU utilisation.

Privacy & Security

Everything runs in your browser; nothing is uploaded.

Data: None
Client-side-Side
Active
v1.0

How to Use

Fill in the target, replica range and CPU target, then generate.

Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.