Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions content/en/docs/tasks/run-application/horizontal-pod-autoscale.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,34 @@ When you create a HorizontalPodAutoscaler API object, make sure the name specifi
More details about the API object can be found at
[HorizontalPodAutoscaler Object](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#horizontalpodautoscaler-v2-autoscaling).

HorizontalPodAutoscaler Object contains Spec and Status.
The `Spec` contains 4 fields:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sort of a nit, but when writing out numbers, it would be best to use the word:

Suggested change
The `Spec` contains 4 fields:
The `Spec` contains four fields:

1. ScaleTargetRef: scale which resource, idenfied by APIVersion, Kind and Name.
2. Replicas Constraints: MinReplicas and MaxReplicas.
3. Metrics: scale based on what.
4. Behavior: ScaleUp and ScaleDown, which contains Stabilitzation Window and Policies.

The `Metrics` supports 4 different sources:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

1. Object
2. Pods
3. Resource
4. External
5. ContainerResource

| Metric Type | Source of Data | Logic Applied | Typical Example |
| :--- | :--- | :--- | :--- |
| **Resource** | CPU / RAM usage (Built-in) | Usage vs. Request % | Scale when CPU > 80% |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another nit, but it doesn't feel right to me to have these in a different order than they are listed just prior to the table.

Maybe even alphabetize the list?

| **Pods** | Inside the pods you are scaling | Average of all pods | Scale when `http_requests` per pod > 50 |
| **Object** | Outside the pods (a different object) | Absolute value | Scale when `ingress_requests` > 1000 |
| **External** | Outside the cluster | Absolute value | Scale when `pubsub_queue_length` > 1000 |


The `Status` contains 3 information:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `Status` contains 3 information:
The `Status` contains three pieces of information:

1. Replicas info: CurrentReplicas and DesiredReplicas
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Replicas info: CurrentReplicas and DesiredReplicas
1. Replica info: CurrentReplicas and DesiredReplicas

2. Current Metrics
3. Scaling Conditions: ScalingActive, AbleToScale, ScaleLimited.


## Stability of workload scale {#flapping}

When managing the scale of a group of replicas using the HorizontalPodAutoscaler,
Expand Down