keep hpa settings right

HPA settings that stay right, without manual tuning

PerfectScale analyzes every HPA and applies the right minimum replicas and CPU and memory triggers for you.

HPA settings that stay right, without manual tuning

Automatic HPA Remediation

Maximize savings and keep scaling reliable by finding and fixing stale HPA settings automatically.

  • Lower Idle Minimums: Brings an oversized minReplicas down to a safe level and respects your PodDisruptionBudget. It never raises it.
  • Raise Low Triggers: Lifts CPU and memory triggers that are set too low, so requests stay close to real usage.
  • Fix Unreachable Triggers: Lowers triggers that can never fire, so the HPA scales before the container is throttled or OOM-killed.

Precise Trigger Targeting

Make sure every trigger measures the right container, with the right numbers.

  • Container-Level Triggers: Replaces a pod-level trigger with a container trigger, so a sidecar cannot hide the real load of your app.
  • HPA and KEDA Compatible: When KEDA generates the HPA, PerfectScale patches the ScaledObject instead.
  • Built on Pod Automation: Changes an HPA while the workload runs on a revision created by PerfectScale Automation, because triggers depend on resource requests.

Safe and Controlled Automation

Review every recommendation first, then turn on automation at the level you choose.

  • Recommendations Without Setup: Every HPA gets recommendations in the HPA tab of PodFit. Automation is opt-in.
  • Your Own Ranges: Turn each value on or off and set a minimum and maximum, for a cluster, a namespace or a workload. Trigger ranges can also be set per container.
  • Clear Events and One Stop Switch: Every change is recorded as a Kubernetes event on the HPA. One setting stops HPA automation while pod automation continues.

Feature Chart

  • HPA Recommendations

    Get recommendations for every HPA without any setup.

  • Reasons and YAML

    See why each change is recommended and copy the YAML.

  • Minimum Replicas Optimization

    Lower minReplicas to a safe level that respects your PDB.

  • Low Trigger Detection

    Raise CPU and memory triggers that are set too low.

  • Unreachable Trigger Detection

    Lower triggers that the workload can never reach.

  • Container-Level Triggers

    Move a pod-level trigger to the app container, so sidecars do not skew scaling.

  • KEDA ScaledObject Support

    Patch the ScaledObject when KEDA generates the HPA.

  • PodDisruptionBudget Aware

    Keeps minReplicas high enough for your PDB.

  • Maintenance Window

    Apply changes within the maintenance window of the workload.

  • Custom Ranges

    Set a minimum and maximum per value. Trigger ranges can be set per container.

  • Kubernetes Events

    Every change is recorded as an event on the HPA.

  • Applied Values Stay

    A webhook restores applied values after a GitOps sync.

  • Min Equals Max Detection

    Catch HPAs that cannot scale and lower minReplicas when possible.

  • Max Replicas Reporting

    Report workloads stuck at maxReplicas. Never changes it.

Frequently asked
questions

What is HPA automation?

PerfectScale analyzes every HorizontalPodAutoscaler (HPA) in your cluster and recommends changes to minReplicas and to the CPU and memory triggers (averageUtilization). With HPA automation on, PerfectScale applies these recommendations for you.

Recommendations are available for every HPA without any setup. Automation is opt-in and is configured with the Automation custom resource.

Does PerfectScale change maxReplicas or the scaling behavior?

No. PerfectScale never changes maxReplicas or the scaling behavior. Only CPU and memory triggers of the Utilization type are analyzed.

When a workload stays at maxReplicas with a slow scale-down, PerfectScale reports it so you can review both settings. When minReplicas equals maxReplicas, PerfectScale lowers minReplicas if maxReplicas is above the recommended value. Otherwise, it reports the finding and you raise maxReplicas yourself.

How does PerfectScale choose trigger values?

PerfectScale uses the requests and limits it recommends for each workload to work out the highest trigger that can still fire. A trigger above that point cannot scale the HPA before the container is throttled or OOM-killed, so PerfectScale lowers it.

The calculation uses the recommended requests and limits, not only the current ones. You can find the full details in the HPA automation docs.

Does HPA automation work with KEDA?

Yes. When KEDA generates the HPA, PerfectScale patches the ScaledObject instead. It changes minReplicaCount and the cpu and memory triggers with metricType: Utilization. It never sets minReplicaCount below idleReplicaCount + 1, and it records the events on the ScaledObject.

How do I turn on HPA automation?

You need Autoscaler version v1.0.71 or later and PerfectScale exporter version v1.1.28 or later. Pod automation must be enabled for the workload, because triggers depend on resource requests. PerfectScale changes an HPA only while the workload runs on a revision created by PerfectScale Automation.

Then add the hpa block with automationMode: Enabled to your Automation configuration, at the cluster, namespace or workload level. The most specific level takes priority. Once enabled, HPA shows as Active in the Automation menu.

Will a GitOps sync undo the changes?

No. The admission webhook keeps the values that PerfectScale applied. When another tool or user changes them, for example on a GitOps sync, the applied value is restored in the same request and kubectl prints a warning.

With HPA automation on, the HPA in the cluster no longer matches the manifest in Git. To take a value back, set enabled: false for it, or exclude the workload from HPA automation.

Cut idle replicas, keep scaling reliable

Install in minutes and get autonomous optimization insights.