You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This defines a short delay period after a Pod starts during which the HPA controller treats Pods that are currently `Unready` as still initializing, **even if they have previously transitioned to `Ready` briefly**.
235
+
236
+
It is designed to:
237
+
- Avoid including Pods that rapidly fluctuate between `Ready` and `Unready` during startup.
238
+
- Ensure stability in the initial readiness signal before HPA considers their metrics valid.
239
+
240
+
**Key behaviors:**
241
+
- If a Pod is `Ready` and remains `Ready`, it can be counted as contributing metrics even within the delay.
242
+
- If a Pod rapidly toggles between `Ready` and `Unready`, metrics are ignored until it’s considered stably `Ready`.
243
+
244
+
#### 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`.
248
+
249
+
This avoids scaling based on temporary spikes that do not reflect long-term workload needs.
250
+
251
+
220
252
## API Object
221
253
222
254
The Horizontal Pod Autoscaler is an API resource in the Kubernetes
0 commit comments