@@ -13,7 +13,7 @@ weight: 110
13
13
14
14
<!-- overview -->
15
15
16
- {{< feature-state state="beta " for_k8s_version="v1.20 " >}}
16
+ {{< feature-state state="stable " for_k8s_version="v1.29 " >}}
17
17
18
18
<!--
19
19
Controlling the behavior of the Kubernetes API server in an overload situation
@@ -80,48 +80,38 @@ APF 适用于 **watch** 请求。当 APF 被禁用时,**watch** 请求不受 `
80
80
## 启用/禁用 API 优先级和公平性 {#enabling-api-priority-and-fairness}
81
81
82
82
<!--
83
- The API Priority and Fairness feature is controlled by a feature gate
84
- and is enabled by default. See [Feature
85
- Gates ](/docs/reference/command-line-tools-reference/feature-gates /)
86
- for a general explanation of feature gates and how to enable and
87
- disable them. The name of the feature gate for APF is
88
- "APIPriorityAndFairness ". This feature also involves an {{<
89
- glossary_tooltip term_id="api-group" text="API Group" >}} with: (a) a
90
- `v1alpha1` version and a `v1beta1 ` version, disabled by default , and
91
- (b) `v1beta2` and `v1beta3` versions , enabled by default. You can
92
- disable the feature gate and API group beta versions by adding the
93
- following command-line flags to your `kube-apiserver` invocation:
94
- -->
95
- API 优先级与公平性(APF)特性由特性门控控制 ,默认情况下启用。
96
- 有关特性门控的一般性描述以及如何启用和禁用特性门控 ,
97
- 请参见[ 特性门控 ] ( /zh-cn/docs/reference/command-line-tools-reference/feature-gates / ) 。
98
- APF 的特性门控称为 ` APIPriorityAndFairness ` 。
83
+ The API Priority and Fairness feature is controlled by a command-line flag
84
+ and is enabled by default. See
85
+ [Options ](/docs/reference/command-line-tools-reference/kube-apiserver/options /)
86
+ for a general explanation of the available kube-apiserver command-line
87
+ options and how to enable and disable them. The name of the
88
+ command-line option for APF is "--enable-priority-and-fairness ". This feature
89
+ also involves an {{< glossary_tooltip term_id="api-group" text="API Group" >}}
90
+ with: (a) a stable `v1 ` version, introduced in 1.29 , and
91
+ enabled by default (b) a `v1beta3` version , enabled by default, and
92
+ deprecated in v1.29. You can
93
+ disable the API group beta version `v1beta3` by adding the
94
+ -->
95
+ API 优先级与公平性(APF)特性由命令行标志控制 ,默认情况下启用。
96
+ 有关可用 kube-apiserver 命令行参数以及如何启用和禁用的说明 ,
97
+ 请参见[ 参数 ] ( /zh-cn/docs/reference/command-line-tools-reference/kube-apiserver/options / ) 。
98
+ APF 的命令行参数是 "--enable-priority-and-fairness" 。
99
99
此特性也与某个 {{< glossary_tooltip term_id="api-group" text="API 组" >}}相关:
100
- (a) ` v1alpha1 ` 和 ` v1beta1 ` 版本,默认被禁用 ;
101
- (b) ` v1beta2 ` 和 ` v1beta3 ` 版本,默认被启用。
102
- 你可以在启动 ` kube-apiserver ` 时,添加以下命令行标志来禁用此功能门控及 API Beta 组:
100
+ (a) 稳定的 ` v1 ` 版本,在 1.29 中引入,默认启用 ;
101
+ (b) ` v1beta3 ` 版本,默认被启用,在 1.29 中被弃用 。
102
+ 你可以通过添加以下内容来禁用 Beta 版的 ` v1beta3 ` API 组:
103
103
104
104
``` shell
105
105
kube-apiserver \
106
- --feature-gates=APIPriorityAndFairness=false \
107
- --runtime-config=flowcontrol.apiserver.k8s.io/v1beta2=false,flowcontrol.apiserver.k8s.io/v1beta3=false \
106
+ --runtime-config=flowcontrol.apiserver.k8s.io/v1beta3=false \
108
107
# ...其他配置不变
109
108
```
110
109
111
- <!--
112
- Alternatively, you can enable the v1alpha1 and v1beta1 versions of the API group
113
- with `--runtime-config=flowcontrol.apiserver.k8s.io/v1alpha1=true,flowcontrol.apiserver.k8s.io/v1beta1=true`.
114
- -->
115
- 或者,你也可以通过
116
- ` --runtime-config=flowcontrol.apiserver.k8s.io/v1alpha1=true,flowcontrol.apiserver.k8s.io/v1beta1=true `
117
- 启用 API 组的 v1alpha1 和 v1beta1 版本。
118
-
119
110
<!--
120
111
The command-line flag `--enable-priority-and-fairness=false` will disable the
121
- API Priority and Fairness feature, even if other flags have enabled it .
112
+ API Priority and Fairness feature.
122
113
-->
123
- 命令行标志 ` --enable-priority-fairness=false ` 将彻底禁用 APF 特性,
124
- 即使其他标志启用它也是无效。
114
+ 命令行标志 ` --enable-priority-fairness=false ` 将彻底禁用 APF 特性。
125
115
126
116
<!--
127
117
## Concepts
@@ -312,23 +302,20 @@ server.
312
302
## Resources
313
303
314
304
The flow control API involves two kinds of resources.
315
- [PriorityLevelConfigurations](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#prioritylevelconfiguration-v1beta2 -flowcontrol-apiserver-k8s-io)
305
+ [PriorityLevelConfigurations](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#prioritylevelconfiguration-v1 -flowcontrol-apiserver-k8s-io)
316
306
define the available priority levels, the share of the available concurrency
317
307
budget that each can handle, and allow for fine-tuning queuing behavior.
318
- [FlowSchemas](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#flowschema-v1beta2 -flowcontrol-apiserver-k8s-io)
308
+ [FlowSchemas](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#flowschema-v1 -flowcontrol-apiserver-k8s-io)
319
309
are used to classify individual inbound requests, matching each to a
320
- single PriorityLevelConfiguration. There is also a `v1alpha1` version
321
- of the same API group, and it has the same Kinds with the same syntax and
322
- semantics.
310
+ single PriorityLevelConfiguration.
323
311
-->
324
312
## 资源 {#resources}
325
313
326
314
流控 API 涉及两种资源。
327
- [ PriorityLevelConfiguration] (/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#prioritylevelconfiguration-v1beta2 -flowcontrol-apiserver-k8s-io)
315
+ [ PriorityLevelConfiguration] (/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#prioritylevelconfiguration-v1 -flowcontrol-apiserver-k8s-io)
328
316
定义可用的优先级和可处理的并发预算量,还可以微调排队行为。
329
- [ FlowSchema] (/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#flowschema-v1beta2 -flowcontrol-apiserver-k8s-io)
317
+ [ FlowSchema] (/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#flowschema-v1 -flowcontrol-apiserver-k8s-io)
330
318
用于对每个入站请求进行分类,并与一个 PriorityLevelConfiguration 相匹配。
331
- 此外同一 API 组还有一个 ` v1alpha1 ` 版本,其中包含语法和语义都相同的资源类别。
332
319
333
320
<!--
334
321
### PriorityLevelConfiguration
0 commit comments