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 the time window after a Pod starts during which its **CPU usage is ignored** unless:
227
227
- The Pod is in a `Ready` state **and**
228
228
- The metric sample was taken entirely during the period it was `Ready`.
229
229
230
-
This flag helps **exclude misleading high CPU usage** from initializing Pods (e.g., Java apps warming up) in HPA scaling decisions.
230
+
This command line option helps **exclude misleading high CPU usage** from initializing Pods (for example: Java apps warming up) in HPA scaling decisions.
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
235
236
236
It is designed to:
237
237
- Avoid including Pods that rapidly fluctuate between `Ready` and `Unready` during startup.
238
238
- Ensure stability in the initial readiness signal before HPA considers their metrics valid.
239
239
240
-
**Key behaviors:**
240
+
241
+
You can only set these command line options cluster-wide.
242
+
243
+
### Key behaviors for pod readiness {#pod-readiness-key-behaviors}
244
+
241
245
- If a Pod is `Ready` and remains `Ready`, it can be counted as contributing metrics even within the delay.
242
246
- If a Pod rapidly toggles between `Ready` and `Unready`, metrics are ignored until it’s considered stably `Ready`.
243
247
244
-
#### Best Practice:
245
-
246
-
If your Pod has a startup phase with high CPU usage:
248
+
### Good practice for pod readiness {#pod-readiness-good-practices}
247
249
248
250
- Configure a `startupProbe` that doesn't pass until the high CPU usage has passed, or
249
251
- Ensure your `readinessProbe` only reports `Ready`**after** the CPU spike subsides, using `initialDelaySeconds`.
250
252
251
253
And ideally also set `--horizontal-pod-autoscaler-cpu-initialization-period` to **cover the startup duration**.
252
254
253
-
## API Object
255
+
## API object
254
256
255
-
The Horizontal Pod Autoscaler is an API resource in the Kubernetes
257
+
The HorizontalPodAutoscaler is an API kind in the Kubernetes
256
258
`autoscaling` API group. The current stable version can be found in
257
259
the `autoscaling/v2` API version which includes support for scaling on
258
260
memory and custom metrics. The new fields introduced in
@@ -512,7 +514,7 @@ default can be updated for both scale-up and scale-down using the
512
514
`--horizontal-pod-autoscaler-tolerance`command line argument. (You can't use the Kubernetes API
513
515
to configure this default value.)
514
516
515
-
### Default Behavior
517
+
### Default behavior
516
518
517
519
To use the custom scaling not all fields have to be specified. Only values which need to be
518
520
customized can be specified. These custom values are merged with default values. The default values
@@ -538,7 +540,7 @@ behavior:
538
540
selectPolicy: Max
539
541
```
540
542
For scaling down the stabilization window is _300_ seconds (or the value of the
541
-
`--horizontal-pod-autoscaler-downscale-stabilization`flag if provided). There is only a single policy
543
+
`--horizontal-pod-autoscaler-downscale-stabilization`command line option, if provided). There is only a single policy
542
544
for scaling down which allows a 100% of the currently running replicas to be removed which
543
545
means the scaling target can be scaled down to the minimum allowed replicas.
544
546
For scaling up there is no stabilization window. When the metrics indicate that the target should be
0 commit comments