Skip to content

Commit cfb8459

Browse files
committed
Revise best practice for autoscaling
- Don't assume that solution developers can reconfigure the cluster - Consider a startup probe
1 parent 05db117 commit cfb8459

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

content/en/docs/tasks/run-application/horizontal-pod-autoscale.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,12 +242,13 @@ The HorizontalPodAutoscaler (HPA) controller includes two flags that influence h
242242
- If a Pod rapidly toggles between `Ready` and `Unready`, metrics are ignored until it’s considered stably `Ready`.
243243

244244
#### Best Practice:
245-
If your Pod has a startup phase with high CPU usage, configure both:
246-
- `--horizontal-pod-autoscaler-cpu-initialization-period` to **cover the startup duration**.
247-
- Ensure your **readinessProbe** only reports `Ready` **after the CPU spike subsides**, using `initialDelaySeconds`.
248245

249-
This avoids scaling based on temporary spikes that do not reflect long-term workload needs.
246+
If your Pod has a startup phase with high CPU usage:
250247

248+
- Configure a `startupProbe` that doesn't pass until the high CPU usage has passed, or
249+
- Ensure your `readinessProbe` only reports `Ready` **after** the CPU spike subsides, using `initialDelaySeconds`.
250+
251+
And ideally also set `--horizontal-pod-autoscaler-cpu-initialization-period` to **cover the startup duration**.
251252

252253
## API Object
253254

0 commit comments

Comments
 (0)