Skip to content

Commit f3ac5a1

Browse files
authored
Merge pull request #48293 from windsonsea/tainsy
[zh] Resync labels-annotations-taints/_index.md
2 parents 3157d45 + 967648c commit f3ac5a1

File tree

1 file changed

+73
-49
lines changed
  • content/zh-cn/docs/reference/labels-annotations-taints

1 file changed

+73
-49
lines changed

content/zh-cn/docs/reference/labels-annotations-taints/_index.md

Lines changed: 73 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -290,14 +290,13 @@ or use a different optimization. However, as of Kubernetes version {{< skew curr
290290
it is required by kubectl. When present, the value of this annotation must be a comma separated list
291291
of the group-kinds, in the fully-qualified name format, i.e. `<resource>.<group>`.
292292
-->
293-
此注解处于 alpha 阶段。
293+
此注解处于 Alpha 阶段。
294294
对于 Kubernetes {{< skew currentVersion >}} 版本,如果定义它们的
295295
{{< glossary_tooltip term_id="CustomResourceDefinition" text="CustomResourceDefinition" >}}
296296
打了 `applyset.kubernetes.io/is-parent-type` 标签,
297297
那么你可以在 Secret、ConfigMap 或自定义资源上使用此注解。
298298

299-
规范的部分功能用来实现
300-
[在 kubectl 中基于 ApplySet 的删除](/zh-cn/docs/tasks/manage-kubernetes-objects/declarative-config/#alternative-kubectl-apply-f-directory-prune)
299+
规范的部分功能用来实现[在 kubectl 中基于 ApplySet 的删除](/zh-cn/docs/tasks/manage-kubernetes-objects/declarative-config/#alternative-kubectl-apply-f-directory-prune)
301300
此注解应用于父对象,这些父对象用于跟踪 ApplySet 以优化 ApplySet 成员对象列表。
302301
它在 AppySet 规范中是可选的,因为工具可以执行发现或使用不同的优化。
303302
然而,对于 Kubernetes {{< skew currentVersion >}} 版本,它是 kubectl 必需的。
@@ -333,14 +332,13 @@ of the group-kinds, in the fully-qualified name format, i.e. `<resource>.<group>
333332

334333
用于:作为 ApplySet 父对象使用的对象。
335334

336-
此注解处于 alpha 阶段。
335+
此注解处于 Alpha 阶段。
337336
对于 Kubernetes {{< skew currentVersion >}} 版本, 如果定义它们的
338337
{{< glossary_tooltip term_id="CustomResourceDefinition" text="CustomResourceDefinition" >}}
339338
打了 `applyset.kubernetes.io/is-parent-type` 标签,
340-
那么你可以在 Secret、ConfigMaps 或自定义资源上使用此注解。
339+
那么你可以在 Secret、ConfigMap 或自定义资源上使用此注解。
341340

342-
规范的部分功能用来实现
343-
[在 kubectl 中基于 ApplySet 的删除](/zh-cn/docs/tasks/manage-kubernetes-objects/declarative-config/#alternative-kubectl-apply-f-directory-prune)
341+
规范的部分功能用来实现[在 kubectl 中基于 ApplySet 的删除](/zh-cn/docs/tasks/manage-kubernetes-objects/declarative-config/#alternative-kubectl-apply-f-directory-prune)
344342
此注解应用于父对象,这些父对象用于跟踪 ApplySet 以优化 ApplySet 成员对象列表。
345343
它在 AppySet 规范中是可选的,因为工具可以执行发现或使用不同的优化。
346344
然而,对于 Kubernetes {{< skew currentVersion >}} 版本,它是 kubectl 必需的。
@@ -355,7 +353,7 @@ Example: `applyset.kubernetes.io/contains-group-resources: "certificates.cert-ma
355353
356354
Used on: Objects being used as ApplySet parents.
357355
-->
358-
### applyset.kubernetes.io/contains-group-resources (已弃用) {#applyset-kubernetes-io-contains-group-resources}
356+
### applyset.kubernetes.io/contains-group-resources已弃用 {#applyset-kubernetes-io-contains-group-resources}
359357

360358
类别:注解
361359

@@ -380,8 +378,7 @@ of the group-kinds, in the fully-qualified name format, i.e. `<resource>.<group>
380378
CustomResourceDefinition 打了 `applyset.kubernetes.io/is-parent-type` 标签,
381379
那么你可以在 Secret、ConfigMap 或自定义资源上使用此注解。
382380

383-
规范的部分功能用来实现
384-
[在 kubectl 中基于 ApplySet 的删除](/zh-cn/docs/tasks/manage-kubernetes-objects/declarative-config/#alternative-kubectl-apply-f-directory-prune)
381+
规范的部分功能用来实现[在 kubectl 中基于 ApplySet 的删除](/zh-cn/docs/tasks/manage-kubernetes-objects/declarative-config/#alternative-kubectl-apply-f-directory-prune)
385382
此注解应用于父对象,这些父对象用于跟踪 ApplySet 以优化 ApplySet 成员对象列表。
386383
它在 AppySet 规范中是可选的,因为工具可以执行发现或使用不同的优化。
387384
然而,对于 Kubernetes {{< skew currentVersion >}} 版本,它是 kubectl 必需的。
@@ -427,17 +424,16 @@ There is no relation between the value of this label and object UID.
427424

428425
用于:作为 ApplySet 父对象使用的对象。
429426

430-
此注解处于 alpha 阶段。
427+
此注解处于 Alpha 阶段。
431428
对于 Kubernetes {{< skew currentVersion >}} 版本, 如果定义它们的
432429
{{< glossary_tooltip term_id="CustomResourceDefinition" text="CustomResourceDefinition" >}}
433-
打了 `applyset.kubernetes.io/is-parent-type` 标签,那么你可以在 Secret、ConfigMaps 或自定义资源上使用此注解。
430+
打了 `applyset.kubernetes.io/is-parent-type` 标签,那么你可以在 Secret、ConfigMap 或自定义资源上使用此注解。
434431

435-
规范的部分功能用来实现
436-
[在 kubectl 中基于 ApplySet 的删除](/zh-cn/docs/tasks/manage-kubernetes-objects/declarative-config/#alternative-kubectl-apply-f-directory-prune)
432+
规范的部分功能用来实现[在 kubectl 中基于 ApplySet 的删除](/zh-cn/docs/tasks/manage-kubernetes-objects/declarative-config/#alternative-kubectl-apply-f-directory-prune)
437433
此标签使对象成为 AppySet 父对象。
438434
它的值是 ApplySet 的唯一 ID,该 ID 派生自父对象本身的标识。
439435
该 ID **必须** 是所在对象的 group-kind-name-namespace 的 hash 的 base64 编码(使用 RFC4648 的 URL 安全编码),
440-
格式为: `<base64(sha256(<name>.<namespace>.<kind>.<group>))>`
436+
格式为:`<base64(sha256(<name>.<namespace>.<kind>.<group>))>`
441437
此标签的值与对象 UID 之间没有关系。
442438

443439
<!--
@@ -465,11 +461,10 @@ not being a valid parent for ApplySets, omit this label.
465461

466462
用于:自定义资源 (CRD)
467463

468-
此注解处于 alpha 阶段。
469-
规范的部分功能用来实现
470-
[在 kubectl 中基于 ApplySet 的删除](/zh-cn/docs/tasks/manage-kubernetes-objects/declarative-config/#alternative-kubectl-apply-f-directory-prune)
464+
此注解处于 Alpha 阶段。
465+
规范的部分功能用来实现[在 kubectl 中基于 ApplySet 的删除](/zh-cn/docs/tasks/manage-kubernetes-objects/declarative-config/#alternative-kubectl-apply-f-directory-prune)
471466
你可以在 {{< glossary_tooltip term_id="CustomResourceDefinition" text="CustomResourceDefinition" >}} (CRD) 上设置这个标签,
472-
以将它定义的自定义资源类型(而不是 CRD 本身)标识为 ApplySet 的允许父类。
467+
以将它定义的自定义资源类型而不是 CRD 本身标识为 ApplySet 的允许父类。
473468
这个标签唯一允许的值是 `"true"`;如果你想将一个 CRD 标记为不是 ApplySet 的有效父级,请省略这个标签。
474469

475470
<!--
@@ -496,9 +491,8 @@ label on the parent object.
496491

497492
用于:所有对象。
498493

499-
此注解处于 alpha 阶段。
500-
规范的部分功能用来实现
501-
[在 kubectl 中基于 ApplySet 的删除](/zh-cn/docs/tasks/manage-kubernetes-objects/declarative-config/#alternative-kubectl-apply-f-directory-prune)
494+
此注解处于 Alpha 阶段。
495+
规范的部分功能用来实现[在 kubectl 中基于 ApplySet 的删除](/zh-cn/docs/tasks/manage-kubernetes-objects/declarative-config/#alternative-kubectl-apply-f-directory-prune)
502496
此标签使对象成为 ApplySet 的成员。
503497
标签的值 **必须** 与父对象上的 `applyset.kubernetes.io/id` 标签的值相匹配。
504498

@@ -530,13 +524,12 @@ The value must be in the format `<toolname>/<semver>`.
530524

531525
用于:作为 ApplySet 父对象使用的对象。
532526

533-
此注解处于 alpha 阶段。
527+
此注解处于 Alpha 阶段。
534528
对于 Kubernetes {{< skew currentVersion >}} 版本, 如果定义它们的
535529
{{< glossary_tooltip term_id="CustomResourceDefinition" text="CustomResourceDefinition" >}}
536-
打了 `applyset.kubernetes.io/is-parent-type` 标签,那么你可以在 Secret、ConfigMaps 或自定义资源上使用此注解。
530+
打了 `applyset.kubernetes.io/is-parent-type` 标签,那么你可以在 Secret、ConfigMap 或自定义资源上使用此注解。
537531

538-
规范的部分功能用来实现
539-
[在 kubectl 中基于 ApplySet 的删除](/zh-cn/docs/tasks/manage-kubernetes-objects/declarative-config/#alternative-kubectl-apply-f-directory-prune)
532+
规范的部分功能用来实现[在 kubectl 中基于 ApplySet 的删除](/zh-cn/docs/tasks/manage-kubernetes-objects/declarative-config/#alternative-kubectl-apply-f-directory-prune)
540533
此注解应用于父对象,这些父对象用于跟踪 ApplySet 以指示哪个工具管理 AppySet。
541534
工具应该拒绝改变属于其他工具 ApplySets。
542535
该值必须采用 `<toolname>/<semver>` 格式。
@@ -1085,13 +1078,13 @@ Type: Label
10851078
10861079
This label has been deprecated. Please use [`kubernetes.io/os`](#kubernetes-io-os) instead.
10871080
-->
1088-
### beta.kubernetes.io/arch (已弃用) {#beta-kubernetes-io-arch}
1081+
### beta.kubernetes.io/arch已弃用 {#beta-kubernetes-io-arch}
10891082

10901083
类别:标签
10911084

10921085
此标签已被弃用。请改用 [`kubernetes.io/arch`](#kubernetes-io-arch)
10931086

1094-
### beta.kubernetes.io/os (已弃用) {#beta-kubernetes-io-os}
1087+
### beta.kubernetes.io/os已弃用 {#beta-kubernetes-io-os}
10951088

10961089
类别:标签
10971090

@@ -1164,6 +1157,27 @@ Service 上的这个注解表示 Endpoints 控制器是否应该继续为未准
11641157
这些 Service 的 Endpoints 保留其 DNS 记录,并从 kubelet 启动 Pod 中的所有容器并将其标记为
11651158
**Running** 的那一刻起继续接收 Service 的流量,直到 kubelet 停止所有容器并从 API 服务器删除 Pod 为止。
11661159

1160+
<!--
1161+
### autoscaling.alpha.kubernetes.io/behavior (deprecated) {#autoscaling-alpha-kubernetes-io-behavior}
1162+
1163+
Type: Annotation
1164+
1165+
Used on: HorizontalPodAutoscaler
1166+
1167+
This annotation was used to configure the scaling behavior for a HorizontalPodAutoscaler (HPA) in earlier Kubernetes versions.
1168+
It allowed you to specify how the HPA should scale pods up or down, including setting stabilization windows and scaling policies.
1169+
Setting this annotation has no effect in any supported release of Kubernetes.
1170+
-->
1171+
### autoscaling.alpha.kubernetes.io/behavior(已弃用) {#autoscaling-alpha-kubernetes-io-behavior}
1172+
1173+
类别:注解
1174+
1175+
用于:HorizontalPodAutoscaler
1176+
1177+
此注解曾在早期的 Kubernetes 版本中用于配置 HorizontalPodAutoscaler(HPA)的扩缩容行为。
1178+
它允许你指定 HPA 应如何扩容或缩容 Pod,包括设置稳定窗口和扩缩容策略。
1179+
在所有受支持的 Kubernetes 版本中,设置此注解没有任何效果。
1180+
11671181
<!--
11681182
### kubernetes.io/hostname {#kubernetesiohostname}
11691183
@@ -1315,9 +1329,14 @@ backend set:
13151329
你可以向特定的 Worker 节点添加标签,以将这些节点从外部负载均衡器使用的后端服务器列表中去除。
13161330
以下命令可用于从后端集的后端服务器列表中排除一个 Worker 节点:
13171331

1332+
<!--
13181333
```shell
13191334
kubectl label nodes <node-name> node.kubernetes.io/exclude-from-external-load-balancers=true
13201335
```
1336+
-->
1337+
```shell
1338+
kubectl label nodes <节点名称> node.kubernetes.io/exclude-from-external-load-balancers=true
1339+
```
13211340

13221341
<!--
13231342
### controller.kubernetes.io/pod-deletion-cost {#pod-deletion-cost}
@@ -1475,7 +1494,7 @@ bin dir (default `/opt/cni/bin`).
14751494
14761495
Type: Label
14771496
-->
1478-
### beta.kubernetes.io/instance-type (已弃用) {#beta-kubernetes-io-instance-type}
1497+
### beta.kubernetes.io/instance-type已弃用 {#beta-kubernetes-io-instance-type}
14791498

14801499
类别:标签
14811500

@@ -1521,7 +1540,7 @@ Kubelet 使用云驱动定义的实例类型填充它。
15211540
15221541
Type: Label
15231542
-->
1524-
### failure-domain.beta.kubernetes.io/region (已弃用) {#failure-domainbetakubernetesioregion}
1543+
### failure-domain.beta.kubernetes.io/region已弃用 {#failure-domainbetakubernetesioregion}
15251544

15261545
类别:标签
15271546

@@ -1538,7 +1557,7 @@ Starting in v1.17, this label is deprecated in favor of
15381557
15391558
Type: Label
15401559
-->
1541-
### failure-domain.beta.kubernetes.io/zone (已弃用) {#failure-domainbetakubernetesiozone}
1560+
### failure-domain.beta.kubernetes.io/zone已弃用 {#failure-domainbetakubernetesiozone}
15421561

15431562
类别:标签
15441563

@@ -1853,7 +1872,7 @@ Used on: PersistentVolumeClaim
18531872
This annotation has been deprecated since v1.23.
18541873
See [volume.kubernetes.io/storage-provisioner](#volume-kubernetes-io-storage-provisioner).
18551874
-->
1856-
### volume.beta.kubernetes.io/storage-provisioner (已弃用) {#volume-beta-kubernetes-io-storage-provisioner}
1875+
### volume.beta.kubernetes.io/storage-provisioner已弃用 {#volume-beta-kubernetes-io-storage-provisioner}
18571876

18581877
类别:注解
18591878

@@ -2031,7 +2050,7 @@ For example, if the in-tree cloud provider storage type is `CSIMigrationvSphere`
20312050
-->
20322051
### storage.alpha.kubernetes.io/migrated-plugins {#storagealphakubernetesiomigrated-plugins}
20332052

2034-
类型:注解
2053+
类别:注解
20352054

20362055
例子:`storage.alpha.kubernetes.io/migrated-plugins: "kubernetes.io/cinder"`
20372056

@@ -2350,7 +2369,7 @@ Used on: Pod
23502369
23512370
The annotation is used to run Windows containers with Hyper-V isolation.
23522371
-->
2353-
### experimental.windows.kubernetes.io/isolation-type (已弃用) {#experimental-windows-kubernetes-io-isolation-type}
2372+
### experimental.windows.kubernetes.io/isolation-type已弃用 {#experimental-windows-kubernetes-io-isolation-type}
23542373

23552374
类别:注解
23562375

@@ -2429,7 +2448,7 @@ Type: Annotation
24292448
24302449
Used on: Ingress
24312450
-->
2432-
### kubernetes.io/ingress.class (已弃用) {#kubernetes-io-ingress-class}
2451+
### kubernetes.io/ingress.class已弃用 {#kubernetes-io-ingress-class}
24332452

24342453
类别:注解
24352454

@@ -2777,7 +2796,7 @@ Used on: Jobs
27772796
The presence of this annotation on a Job used to indicate that the control plane is
27782797
[tracking the Job status using finalizers](/docs/concepts/workloads/controllers/job/#job-tracking-with-finalizers).
27792798
-->
2780-
### batch.kubernetes.io/job-tracking (已弃用) {#batch-kubernetes-io-job-tracking}
2799+
### batch.kubernetes.io/job-tracking已弃用 {#batch-kubernetes-io-job-tracking}
27812800

27822801
类别:注解
27832802

@@ -3171,7 +3190,8 @@ This allows the Pods on the out-of-service node to recover quickly on a differen
31713190
Refer to [Non-graceful node shutdown](/docs/concepts/architecture/nodes/#non-graceful-node-shutdown)
31723191
for further details about when and how to use this taint.
31733192
-->
3174-
有关何时以及如何使用此污点的更多详细信息,请参阅[非正常节点关闭](/zh-cn/docs/concepts/architecture/nodes/#non-graceful-node-shutdown)。
3193+
有关何时以及如何使用此污点的更多详细信息,
3194+
请参阅[非正常节点关闭](/zh-cn/docs/concepts/architecture/nodes/#non-graceful-node-shutdown)。
31753195
{{< /caution >}}
31763196

31773197
<!--
@@ -3297,8 +3317,8 @@ if there is one running on a node. It's used for informative use only.
32973317
用于:节点
32983318
32993319
这个注解记录 NFD-[worker](https://kubernetes-sigs.github.io/node-feature-discovery/stable/usage/nfd-worker.html)
3300-
的版本(如果在节点上运行了一个 NFD-worker 的话)
3301-
它只用于提供信息
3320+
的版本如果在节点上运行了一个 NFD-worker 的话
3321+
此注解只用于提供信息
33023322
33033323
<!--
33043324
### nfd.node.kubernetes.io/feature-labels
@@ -3380,8 +3400,8 @@ the nodes where NFD is running. To learn more about NFD and
33803400
its components go to its official [documentation](https://kubernetes-sigs.github.io/node-feature-discovery/stable/get-started/).
33813401
-->
33823402
这些节点特性发现(Node Feature Discovery, NFD)的标签或注解仅适用于运行 NFD 的节点。
3383-
要了解关于 NFD 及其组件的信息,请访问官方
3384-
[文档](https://kubernetes-sigs.github.io/node-feature-discovery/stable/get-started/)。
3403+
要了解关于 NFD 及其组件的信息,
3404+
请访问官方[文档](https://kubernetes-sigs.github.io/node-feature-discovery/stable/get-started/)。
33853405
{{< /note >}}
33863406

33873407
### service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval (beta) {#service-beta-kubernetes-io-aws-load-balancer-access-log-emit-interval}
@@ -3624,9 +3644,8 @@ evenly across the registered targets in its availability zone only.
36243644
36253645
用于:Service
36263646
3627-
与 AWS 弹性负载均衡集成的云控制器管理器会根据此注解配置负载均衡器。
3628-
如果你将此注解设置为 "true",每个负载均衡器节点将在所有启用的
3629-
[可用区](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-availability-zones)中的注册目标上均匀地分发请求。
3647+
与 AWS 弹性负载均衡集成的云控制器管理器会根据此注解配置负载均衡器。如果你将此注解设置为 "true",
3648+
每个负载均衡器节点将在所有启用的[可用区](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-availability-zones)中的注册目标上均匀地分发请求。
36303649
如果你禁用跨区负载均衡,则每个负载均衡器节点仅在其可用区中跨注册目标均匀地分发请求。
36313650
36323651
### service.beta.kubernetes.io/aws-load-balancer-eip-allocations (beta) {#service-beta-kubernetes-io-aws-load-balancer-eip-allocations}
@@ -4471,7 +4490,7 @@ learn the supported way to specify seccomp restrictions for a Pod.
44714490
用于:Pod
44724491

44734492
v1.25 之前的 Kubernetes 允许你使用此注解配置 seccomp 行为。
4474-
请参考 [使用 seccomp 限制容器的系统调用](/zh-cn/docs/tutorials/security/seccomp/),
4493+
请参考[使用 seccomp 限制容器的系统调用](/zh-cn/docs/tutorials/security/seccomp/),
44754494
了解为 Pod 指定 seccomp 限制的受支持方法。
44764495

44774496
<!--
@@ -4492,7 +4511,7 @@ learn the supported way to specify seccomp restrictions for a Pod.
44924511
用于:Pod
44934512

44944513
v1.25 之前的 Kubernetes 允许你使用此注解配置 seccomp 行为。
4495-
请参考 [使用 seccomp 限制容器的系统调用](/zh-cn/docs/tutorials/security/seccomp/)
4514+
请参考[使用 seccomp 限制容器的系统调用](/zh-cn/docs/tutorials/security/seccomp/)
44964515
了解为 Pod 指定 seccomp 限制的受支持方法。
44974516

44984517
### snapshot.storage.kubernetes.io/allow-volume-mode-change {#allow-volume-mode-change}
@@ -4705,9 +4724,9 @@ ignores that node while calculating Topology Aware Hints.
47054724
用来指示该节点用于运行控制平面组件的标记标签。Kubeadm 工具将此标签应用于其管理的控制平面节点。
47064725
其他集群管理工具通常也会设置此污点。
47074726

4708-
你可以使用此标签来标记控制平面节点,以便更容易地将 Pod 仅安排到这些节点上,或者避免在控制平面上运行 Pod。
4709-
如果设置了此标签,[EndpointSlice 控制器](/zh-cn/docs/concepts/services-networking/topology-aware-routing/#implementation-control-plane)
4710-
在计算拓扑感知提示时将忽略该节点。
4727+
你可以使用此标签来标记控制平面节点,以便更容易地将 Pod 仅安排到这些节点上,
4728+
或者避免在控制平面上运行 Pod。如果设置了此标签,
4729+
[EndpointSlice 控制器](/zh-cn/docs/concepts/services-networking/topology-aware-routing/#implementation-control-plane)在计算拓扑感知提示时将忽略该节点。
47114730

47124731
<!--
47134732
### node-role.kubernetes.io/control-plane {#node-role-kubernetes-io-control-plane-taint}
@@ -4737,9 +4756,14 @@ Kubeadm 应用在控制平面节点上的污点, 用来限制启动 Pod,并且
47374756

47384757
如果应用此污点,则控制平面节点只允许对其进行关键工作负载调度。可以在特定节点上使用以下命令手动删除此污染。
47394758

4759+
<!--
47404760
```shell
47414761
kubectl taint nodes <node-name> node-role.kubernetes.io/control-plane:NoSchedule-
47424762
```
4763+
-->
4764+
```shell
4765+
kubectl taint nodes <节点名称> node-role.kubernetes.io/control-plane:NoSchedule-
4766+
```
47434767

47444768
<!--
47454769
### node-role.kubernetes.io/master (deprecated) {#node-role-kubernetes-io-master-taint}

0 commit comments

Comments
 (0)