All Tools View Categories About Contact Privacy

Horizontal Pod Autoscaler YAML Generator

Build a valid Kubernetes HorizontalPodAutoscaler (autoscaling/v2) with a target, replica bounds and CPU/memory utilization metrics.

Runs entirely in your browser - nothing is uploaded and no cluster connection is made.
-
min replicas
-
max replicas
0
metrics
Your generated HorizontalPodAutoscaler YAML will appear here.

About Horizontal Pod Autoscaler YAML Generator

A HorizontalPodAutoscaler (HPA) watches a workload and grows or shrinks its replicas to meet a target metric. The HorizontalPodAutoscaler YAML Generator writes that manifest from a form so you do not have to recall the autoscaling/v2 schema.

You set the HPA name and namespace, then point it at a target - a Deployment, StatefulSet or ReplicaSet - by name. You set the minimum and maximum replica counts, then choose one or both of CPU and memory utilization targets (as percentages). The generator builds the metrics list with the correct Resource metric type. The resulting YAML is valid autoscaling/v2.

The name is validated as an RFC 1123 label, the target name is required, max must be at least min, and at least one metric is required. Problems are reported in a clear panel. Everything runs locally and nothing is uploaded.

Features

  • Target - Deployment, StatefulSet or ReplicaSet by name.
  • min/max replicas - bounds the autoscaler may use.
  • CPU utilization - optional percentage target.
  • Memory utilization - optional percentage target.
  • autoscaling/v2 - correct metrics schema.
  • Validation - RFC 1123 name, min/max and required metric.
  • Copy / Download / Print - get hpa.yaml wherever you need it.

How to Use

  1. Name the HPA. Type a valid RFC 1123 name.
  2. Set the target. Pick kind and enter the target name.
  3. Set min and max replicas.
  4. Set CPU and/or memory utilization. e.g. 50 and 60.
  5. Watch the preview and export.

Examples

Example 1 - CPU only. target web, min 2, max 10, cpu 50%.

Example 2 - CPU + memory. cpu 60%, memory 70%.

Example 3 - StatefulSet. kind StatefulSet, target db, max 5.

Example 4 - tight bounds. min 3, max 3 keeps a fixed count.

Example 5 - high scale. max 20 for a bursty service.

Benefits

  • Correct schema - valid autoscaling/v2 HPA.
  • Resource metrics - CPU and memory utilization wired in.
  • Validated - names, bounds and required metric checked.
  • Clean output - empty fields omitted.
  • Private - everything runs in the browser.
  • Copy, download or print - get the manifest where you need it.

Frequently Asked Questions

What is a HorizontalPodAutoscaler?
An HPA automatically scales the number of pod replicas in a Deployment, StatefulSet or ReplicaSet based on observed CPU, memory or custom metrics.
Which API version is used?
autoscaling/v2, which supports resource, pods, object, external and custom metrics.
What target can I scale?
A Deployment, StatefulSet or ReplicaSet. You give its name and the kind, and the generator writes the right scaleTargetRef.
What are min and max replicas?
The autoscaler keeps the replica count between minReplicas and maxReplicas.
What does the utilization target mean?
For a Resource metric of type Utilization, averageUtilization is the target percentage of the resource requested by the pod (e.g. 50 for 50% CPU).
Is the name validated?
Yes. The HPA name must be a valid RFC 1123 label (lowercase letters, numbers and hyphens).
Does this connect to a cluster?
No. Everything is assembled in your browser and nothing is uploaded.
Can I download it?
Yes. Copy the YAML, download hpa.yaml, or print it.