Create an HPA manifest with `apiVersion: autoscaling/v2` and reference the target Deployment under `spec.scaleTargetRef`
Add a `spec.metrics` entry of type `External` or `Pods` with a `metric.name` matching a metric exposed by your metrics adapter (e.g., Prometheus Adapter)
Set `target.type: AverageValue` or `Value` depending on whether the metric should be averaged across pods
Configure `spec.behavior.scaleDown.stabilizationWindowSeconds` and `scaleUp` policies to control scale velocity
Verify the HPA is reading metrics with `kubectl describe hpa` — `<unknown>` in the `TARGETS` column indicates a metrics adapter issue
Install a compatible metrics adapter (Prometheus Adapter, KEDA, or cloud provider adapter) and confirm it serves the named metric
Known gotchas
HPA v2 with external metrics requires a metrics adapter registered against the `external.metrics.k8s.io` API group; without it, the HPA cannot read the metric and will log errors
Conflicting VPA and HPA on the same Deployment fighting over replicas and requests is a known anti-pattern — use VPA in recommendation-only mode alongside HPA
The HPA stabilization window default for scale-down is 300 seconds; in fast-moving workloads this can leave over-provisioned pods running for minutes longer than expected
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp