Skip to content

Commit bf957e1

Browse files
authored
Merge pull request #38751 from Zhuzhenghao/fix/horizontal-pod-autoscale
[zh-cn] Fix links for k/design-proposals-archive
2 parents e98a9ea + 0f2d115 commit bf957e1

File tree

1 file changed

+27
-21
lines changed

1 file changed

+27
-21
lines changed

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

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,9 @@ or the custom metrics API (for all other metrics).
142142
* For per-pod resource metrics (like CPU), the controller fetches the metrics
143143
from the resource metrics API for each Pod targeted by the HorizontalPodAutoscaler.
144144
Then, if a target utilization value is set, the controller calculates the utilization
145-
value as a percentage of the equivalent [resource request](/docs/concepts/configuration/manage-resources-containers/#requests-and-limits) on the containers in
146-
each Pod. If a target raw value is set, the raw metric values are used directly.
145+
value as a percentage of the equivalent
146+
[resource request](/docs/concepts/configuration/manage-resources-containers/#requests-and-limits)
147+
on the containers in each Pod. If a target raw value is set, the raw metric values are used directly.
147148
The controller then takes the mean of the utilization or the raw value (depending on the type
148149
of target specified) across all targeted Pods, and produces a ratio used to scale
149150
the number of desired replicas.
@@ -157,9 +158,8 @@ or the custom metrics API (for all other metrics).
157158
<!--
158159
Please note that if some of the Pod's containers do not have the relevant resource request set,
159160
CPU utilization for the Pod will not be defined and the autoscaler will
160-
not take any action for that metric. See the [algorithm
161-
details](#algorithm-details) section below for more information about
162-
how the autoscaling algorithm works.
161+
not take any action for that metric. See the [algorithm details](#algorithm-details) section below
162+
for more information about how the autoscaling algorithm works.
163163
-->
164164
需要注意的是,如果 Pod 某些容器不支持资源采集,那么控制器将不会使用该 Pod 的 CPU 使用率。
165165
下面的[算法细节](#algorithm-details)章节将会介绍详细的算法。
@@ -173,13 +173,13 @@ or the custom metrics API (for all other metrics).
173173
<!--
174174
* For object metrics and external metrics, a single metric is fetched, which describes
175175
the object in question. This metric is compared to the target
176-
value, to produce a ratio as above. In the `autoscaling/v2beta2` API
176+
value, to produce a ratio as above. In the `autoscaling/v2` API
177177
version, this value can optionally be divided by the number of Pods before the
178178
comparison is made.
179179
-->
180180
* 如果 Pod 使用对象指标和外部指标(每个指标描述一个对象信息)。
181181
这个指标将直接根据目标设定值相比较,并生成一个上面提到的扩缩比例。
182-
`autoscaling/v2beta2` 版本 API 中,这个指标也可以根据 Pod 数量平分后再计算。
182+
`autoscaling/v2` 版本 API 中,这个指标也可以根据 Pod 数量平分后再计算。
183183

184184
<!--
185185
The common use for HorizontalPodAutoscaler is to configure it to fetch metrics from
@@ -212,9 +212,9 @@ HorizontalPodAutoscaler 控制器访问支持扩缩的相应工作负载资源
212212
请参阅 [Kubernetes API 概念](/zh-cn/docs/reference/using-api/api-concepts/)
213213

214214
<!--
215-
### Algorithm Details
215+
### Algorithm details
216216
217-
From the most basic perspective, the Horizontal Pod Autoscaler controller
217+
From the most basic perspective, the HorizontalPodAutoscaler controller
218218
operates on the ratio between desired metric value and current metric
219219
value:
220220
-->
@@ -274,8 +274,8 @@ with missing metrics will be used to adjust the final scaling amount.
274274

275275
<!--
276276
When scaling on CPU, if any pod has yet to become ready (it's still
277-
initializing, or possibly is unhealthy) *or* the most recent metric point for the pod was before it
278-
became ready, that pod is set aside as well.
277+
initializing, or possibly is unhealthy) *or* the most recent metric point for
278+
the pod was before it became ready, that pod is set aside as well.
279279
-->
280280
当使用 CPU 指标来扩缩时,任何还未就绪(还在初始化,或者可能是不健康的)状态的 Pod ****
281281
最近的指标度量值采集于就绪状态前的 Pod,该 Pod 也会被搁置。
@@ -489,7 +489,7 @@ pod usage is still within acceptable limits.
489489
{{< /note >}}
490490
491491
<!--
492-
### Container Resource Metrics
492+
### Container resource metrics
493493
-->
494494
### 容器资源指标 {#container-resource-metrics}
495495
@@ -564,6 +564,8 @@ the old container name from the HPA specification.
564564
<!--
565565
## Scaling on custom metrics
566566

567+
{{< feature-state for_k8s_version="v1.23" state="stable" >}}
568+
567569
(the `autoscaling/v2beta2` API version previously provided this ability as a beta feature)
568570

569571
Provided that you use the `autoscaling/v2` API version, you can configure a HorizontalPodAutoscaler
@@ -588,6 +590,8 @@ HorizontalPodAutoscaler 控制器能够从 Kubernetes API 查询这些自定义
588590
<!--
589591
## Scaling on multiple metrics
590592

593+
{{< feature-state for_k8s_version="v1.23" state="stable" >}}
594+
591595
(the `autoscaling/v2beta2` API version previously provided this ability as a beta feature)
592596

593597
Provided that you use the `autoscaling/v2` API version, you can specify multiple metrics for a
@@ -624,7 +628,7 @@ APIs, cluster administrators must ensure that:
624628
* The corresponding APIs are registered:
625629

626630
* For resource metrics, this is the `metrics.k8s.io` API, generally provided by [metrics-server](https://github.com/kubernetes-sigs/metrics-server).
627-
It can be launched as a cluster addon.
631+
It can be launched as a cluster add-on.
628632

629633
* For custom metrics, this is the `custom.metrics.k8s.io` API. It's provided by "adapter" API servers provided by metrics solution vendors.
630634
Check with your metrics pipeline to see if there is a Kubernetes metrics adapter available.
@@ -646,14 +650,14 @@ APIs, cluster administrators must ensure that:
646650

647651
<!--
648652
For more information on these different metrics paths and how they differ please see the relevant design proposals for
649-
[the HPA V2](https://github.com/kubernetes/design-proposals-archive/blob/main/autoscaling/hpa-v2.md),
650-
[custom.metrics.k8s.io](https://github.com/kubernetes/design-proposals-archive/blob/main/instrumentation/custom-metrics-api.md)
651-
and [external.metrics.k8s.io](https://github.com/kubernetes/design-proposals-archive/blob/main/instrumentation/external-metrics-api.md).
653+
[the HPA V2](https://git.k8s.io/design-proposals-archive/autoscaling/hpa-v2.md),
654+
[custom.metrics.k8s.io](https://git.k8s.io/design-proposals-archive/instrumentation/custom-metrics-api.md)
655+
and [external.metrics.k8s.io](https://git.k8s.io/design-proposals-archive/instrumentation/external-metrics-api.md).
652656
-->
653657
关于指标来源以及其区别的更多信息,请参阅相关的设计文档,
654-
[HPA V2](https://github.com/kubernetes/design-proposals-archive/blob/main/autoscaling/hpa-v2.md),
655-
[custom.metrics.k8s.io](https://github.com/kubernetes/design-proposals-archive/blob/main/instrumentation/custom-metrics-api.md) 和
656-
[external.metrics.k8s.io](https://github.com/kubernetes/design-proposals-archive/blob/main/instrumentation/external-metrics-api.md)。
658+
[HPA V2](https://git.k8s.io/design-proposals-archive/autoscaling/hpa-v2.md),
659+
[custom.metrics.k8s.io](https://git.k8s.io/design-proposals-archive/instrumentation/custom-metrics-api.md) 和
660+
[external.metrics.k8s.io](https://git.k8s.io/design-proposals-archive/instrumentation/external-metrics-api.md)。
657661

658662
<!--
659663
For examples of how to use them see [the walkthrough for using custom metrics](/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/#autoscaling-on-multiple-metrics-and-custom-metrics)
@@ -666,6 +670,8 @@ and [the walkthrough for using external metrics](/docs/tasks/run-application/hor
666670
<!--
667671
## Configurable scaling behavior
668672

673+
{{< feature-state for_k8s_version="v1.23" state="stable" >}}
674+
669675
(the `autoscaling/v2beta2` API version previously provided this ability as a beta feature)
670676

671677
If you use the `v2` HorizontalPodAutoscaler API, you can use the `behavior` field
@@ -694,7 +700,7 @@ rate of change of replicas while scaling.
694700
扩缩策略还允许你在扩缩时控制副本的变化率。
695701

696702
<!--
697-
### Scaling Policies
703+
### Scaling policies
698704

699705
One or more scaling policies can be specified in the `behavior` section of the spec.
700706
When multiple policies are specified the policy which allows the highest amount of
@@ -754,7 +760,7 @@ scaling in that direction.
754760
将该值设置为 `Disabled` 将完全禁用该方向的扩缩。
755761

756762
<!--
757-
### Stabilization Window
763+
### Stabilization window
758764

759765
The stabilization window is used to restrict the [flapping](#flapping) of
760766
replica count when the metrics used for scaling keep fluctuating. The autoscaling algorithm

0 commit comments

Comments
 (0)