Skip to content

Commit c48b27c

Browse files
authored
Merge pull request #49076 from my-git9/pp-12725
[zh-cn]sync labels-annotations-taints/_index.md
2 parents 45927a2 + 7b931eb commit c48b27c

File tree

1 file changed

+71
-37
lines changed
  • content/zh-cn/docs/reference/labels-annotations-taints

1 file changed

+71
-37
lines changed

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

Lines changed: 71 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ of the group-kinds, in the fully-qualified name format, i.e. `<resource>.<group>
298298

299299
规范的部分功能用来实现[在 kubectl 中基于 ApplySet 的删除](/zh-cn/docs/tasks/manage-kubernetes-objects/declarative-config/#alternative-kubectl-apply-f-directory-prune)
300300
此注解应用于父对象,这些父对象用于跟踪 ApplySet 以优化 ApplySet 成员对象列表。
301-
它在 AppySet 规范中是可选的,因为工具可以执行发现或使用不同的优化。
301+
它在 ApplySet 规范中是可选的,因为工具可以执行发现或使用不同的优化。
302302
然而,对于 Kubernetes {{< skew currentVersion >}} 版本,它是 kubectl 必需的。
303303
当存在时,注解的值必须是一个以逗号分隔的 group-kinds 列表,采用完全限定的名称格式,例如 `<resource>.<group>`
304304

@@ -340,7 +340,7 @@ of the group-kinds, in the fully-qualified name format, i.e. `<resource>.<group>
340340

341341
规范的部分功能用来实现[在 kubectl 中基于 ApplySet 的删除](/zh-cn/docs/tasks/manage-kubernetes-objects/declarative-config/#alternative-kubectl-apply-f-directory-prune)
342342
此注解应用于父对象,这些父对象用于跟踪 ApplySet 以优化 ApplySet 成员对象列表。
343-
它在 AppySet 规范中是可选的,因为工具可以执行发现或使用不同的优化。
343+
它在 ApplySet 规范中是可选的,因为工具可以执行发现或使用不同的优化。
344344
然而,对于 Kubernetes {{< skew currentVersion >}} 版本,它是 kubectl 必需的。
345345
当存在时,注解的值必须是一个以逗号分隔的 group-kinds 列表,采用完全限定的名称格式,例如 `<resource>.<group>`
346346

@@ -380,7 +380,7 @@ CustomResourceDefinition 打了 `applyset.kubernetes.io/is-parent-type` 标签
380380

381381
规范的部分功能用来实现[在 kubectl 中基于 ApplySet 的删除](/zh-cn/docs/tasks/manage-kubernetes-objects/declarative-config/#alternative-kubectl-apply-f-directory-prune)
382382
此注解应用于父对象,这些父对象用于跟踪 ApplySet 以优化 ApplySet 成员对象列表。
383-
它在 AppySet 规范中是可选的,因为工具可以执行发现或使用不同的优化。
383+
它在 ApplySet 规范中是可选的,因为工具可以执行发现或使用不同的优化。
384384
然而,对于 Kubernetes {{< skew currentVersion >}} 版本,它是 kubectl 必需的。
385385
当存在时,注解的值必须是一个以逗号分隔的 group-kinds 列表,采用完全限定的名称格式,例如 `<resource>.<group>`
386386

@@ -430,9 +430,9 @@ There is no relation between the value of this label and object UID.
430430
打了 `applyset.kubernetes.io/is-parent-type` 标签,那么你可以在 Secret、ConfigMap 或自定义资源上使用此注解。
431431

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

@@ -530,7 +530,7 @@ The value must be in the format `<toolname>/<semver>`.
530530
打了 `applyset.kubernetes.io/is-parent-type` 标签,那么你可以在 Secret、ConfigMap 或自定义资源上使用此注解。
531531

532532
规范的部分功能用来实现[在 kubectl 中基于 ApplySet 的删除](/zh-cn/docs/tasks/manage-kubernetes-objects/declarative-config/#alternative-kubectl-apply-f-directory-prune)
533-
此注解应用于父对象,这些父对象用于跟踪 ApplySet 以指示哪个工具管理 AppySet
533+
此注解应用于父对象,这些父对象用于跟踪 ApplySet 以指示哪个工具管理 ApplySet
534534
工具应该拒绝改变属于其他工具 ApplySets。
535535
该值必须采用 `<toolname>/<semver>` 格式。
536536

@@ -655,7 +655,7 @@ For example, Kustomize removes objects with this annotation from its final build
655655

656656
当值为 `"false"` 时,可以用来声明该对象应提交到 API 服务器,即使它是本地对象。
657657

658-
该注解是 Kubernetes 资源模型 (KRM) 函数规范的一部分,被 Kustomize 和其他类似的第三方工具使用。
658+
该注解是 Kubernetes 资源模型KRM函数规范的一部分,被 Kustomize 和其他类似的第三方工具使用。
659659
例如,Kustomize 会从其最终构建输出中删除带有此注解的对象。
660660

661661
<!--
@@ -709,13 +709,13 @@ A KRM function **must not** modify annotations with this prefix, unless otherwis
709709
given annotation. This enables orchestrator tools to add additional internal annotations, without
710710
requiring changes to existing functions.
711711
-->
712-
### internal.config.kubernetes.io/* (保留的前缀) {#internal.config.kubernetes.io-reserved-wildcard}
712+
### internal.config.kubernetes.io/*保留的前缀 {#internal.config.kubernetes.io-reserved-wildcard}
713713

714714
类别:注解
715715

716716
用于:所有对象
717717

718-
该前缀被保留,供遵从 Kubernetes 资源模型 (KRM) 函数规范的编排工具内部使用。
718+
该前缀被保留,供遵从 Kubernetes 资源模型KRM函数规范的编排工具内部使用。
719719
带有该前缀的注解仅在编排过程中使用,不会持久化到文件系统。
720720
换句话说,编排工具应从本地文件系统读取文件时设置这些注解,并在将函数输出写回文件系统时删除它们。
721721

@@ -752,7 +752,7 @@ referenced files. A KRM Function **may** include this annotation on objects it g
752752
此注解记录了加载对象清单文件的(斜线分隔、与操作系统无关)相对路径。
753753
该路径相对于文件系统上由编排工具确定的固定位置。
754754

755-
该注解是 Kubernetes 资源模型 (KRM) 函数规范的一部分,被 Kustomize 和其他类似的第三方工具使用。
755+
该注解是 Kubernetes 资源模型KRM函数规范的一部分,被 Kustomize 和其他类似的第三方工具使用。
756756

757757
KRM 函数**不应**在输入对象上修改此注解,除非它正在修改引用的文件。
758758
KRM 函数**可以**在它所生成的对象上包含这个注解。
@@ -1114,10 +1114,10 @@ referenced files. A KRM Function **may** include this annotation on objects it g
11141114
用于:所有对象
11151115
11161116
该注解记录了包含对象的 YAML 文档在加载对象的清单文件中的零索引位置。
1117-
请注意,YAML 文档由三个破折号 (---) 分隔,每个文档可以包含一个对象。
1117+
请注意,YAML 文档由三个破折号---分隔,每个文档可以包含一个对象。
11181118
如果未指定此注解,则该值为 0。
11191119
1120-
该注解是 Kubernetes 资源模型 (KRM) 函数规范的一部分,被 Kustomize 和其他类似的第三方工具使用。
1120+
该注解是 Kubernetes 资源模型KRM函数规范的一部分,被 Kustomize 和其他类似的第三方工具使用。
11211121
11221122
KRM 函数**不应**在输入对象上修改此注解,除非它正在修改引用的文件。
11231123
KRM 函数**可以**在它所生成的对象上包含这个注解。
@@ -1581,26 +1581,35 @@ This annotation is used for describing specific behaviour of given object.
15811581
此注解用于描述给定对象的特定行为。
15821582
15831583
<!--
1584-
### kubernetes.io/enforce-mountable-secrets {#enforce-mountable-secrets}
1584+
### kubernetes.io/enforce-mountable-secrets (deprecated) {#enforce-mountable-secrets}
15851585
15861586
Type: Annotation
15871587
15881588
Example: `kubernetes.io/enforce-mountable-secrets: "true"`
15891589

15901590
Used on: ServiceAccount
1591-
1592-
The value for this annotation must be **true** to take effect.
1593-
When you set this annotation to "true", Kubernetes enforces the following rules for
1594-
Pods running as this ServiceAccount:
15951591
-->
1596-
### kubernetes.io/enforce-mountable-secrets {#enforce-mountable-secrets}
1592+
### kubernetes.io/enforce-mountable-secrets(已弃用) {#enforce-mountable-secrets}
15971593

15981594
类别:注解
15991595

16001596
例子:`kubernetes.io/enforce-mountable-secrets: "true"`
16011597
16021598
用于:ServiceAccount
16031599
1600+
{{< note >}}
1601+
<!--
1602+
`kubernetes.io/enforce-mountable-secrets` is deprecated since Kubernetes v1.32. Use separate namespaces to isolate access to mounted secrets.
1603+
-->
1604+
`kubernetes.io/enforce-mountable-secrets` 自 Kubernetes v1.32 起已弃用。
1605+
使用单独的命名空间来隔离对挂载 Secret 的访问。
1606+
{{< /note >}}
1607+
1608+
<!--
1609+
The value for this annotation must be **true** to take effect.
1610+
When you set this annotation to "true", Kubernetes enforces the following rules for
1611+
Pods running as this ServiceAccount:
1612+
-->
16041613
此注解的值必须为 **true** 才能生效。
16051614
当你将此注解设置为 "true" 时,Kubernetes 会对以此 ServiceAccount 运行的 Pod 强制执行以下规则:
16061615

@@ -2789,6 +2798,34 @@ Starting in v1.18, this annotation is deprecated in favor of `spec.ingressClassN
27892798
从 v1.18 开始,此注解被弃用,改为鼓励使用 `spec.ingressClassName`。
27902799
{{</note>}}
27912800

2801+
<!--
2802+
### kubernetes.io/cluster-service (deprecated) {#kubernetes-io-cluster-service}
2803+
2804+
Type: Label
2805+
2806+
Example: `kubernetes.io/cluster-service: "true"`
2807+
2808+
Used on: Service
2809+
-->
2810+
### kubernetes.io/cluster-service(已弃用) {#kubernetes-io-cluster-service}
2811+
2812+
类别:Label
2813+
2814+
例子:`kubernetes.io/cluster-service: "true"`
2815+
2816+
用于:Service
2817+
2818+
<!--
2819+
This label indicates that the Service provides a service to the cluster, if the value is set to true.
2820+
When you run `kubectl cluster-info`, the tool queries for Services with this label set to true.
2821+
2822+
However, setting this label on any Service is deprecated.
2823+
-->
2824+
此标签表示当值设置为 `true` 时,Service 向集群提供服务。
2825+
当你运行 `kubectl cluster-info` 时,该工具会查询具有此标签且值为 `true` 的 Service。
2826+
2827+
然而,在此任何 Service 上设置此标签已弃用。
2828+
27922829
<!--
27932830
### storageclass.kubernetes.io/is-default-class
27942831

@@ -3494,10 +3531,8 @@ Example: `node.kubernetes.io/out-of-service:NoExecute`
34943531
Used on: Node
34953532

34963533
A user can manually add the taint to a Node marking it out-of-service.
3497-
If the `NodeOutOfServiceVolumeDetach`
3498-
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
3499-
is enabled on `kube-controller-manager`, and a Node is marked out-of-service with this taint,
3500-
the Pods on the node will be forcefully deleted if there are no matching tolerations on it and
3534+
If a Node is marked out-of-service with this taint, the Pods on the node
3535+
will be forcefully deleted if there are no matching tolerations on it and
35013536
volume detach operations for the Pods terminating on the node will happen immediately.
35023537
This allows the Pods on the out-of-service node to recover quickly on a different node.
35033538
-->
@@ -3507,11 +3542,10 @@ This allows the Pods on the out-of-service node to recover quickly on a differen
35073542

35083543
用于:Node
35093544

3510-
用户可以手动将污点添加到节点,将其标记为停止服务。
3511-
如果 `kube-controller-manager` 上启用了 `NodeOutOfServiceVolumeDetach`
3512-
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/),
3513-
并且一个节点被这个污点标记为停止服务,如果节点上的 Pod 没有对应的容忍度,
3514-
这类 Pod 将被强制删除,并且,针对在节点上被终止 Pod 的卷分离操作将被立即执行。
3545+
用户可以手动将污点添加到节点,标记其为停止服务。
3546+
如果一个节点被这个污点标记为停止服务,则该节点上的 Pod 将会在没有匹配的容忍时被强制删除,
3547+
并且针对在此节点上终止的 Pod 的卷分离操作将立即发生。
3548+
这允许停止服务的节点上的 Pod 快速在不同节点上恢复。
35153549

35163550
{{< caution >}}
35173551
<!--
@@ -3596,7 +3630,7 @@ For details, see the [customization guide](https://kubernetes-sigs.github.io/nod
35963630
所有内置的标签都使用 feature.node.kubernetes.io 标签命名空间,并且格式为
35973631
`feature.node.kubernetes.io/<feature-name>: <true>`。
35983632
NFD 有许多用于创建特定于供应商和应用程序的标签的扩展点。
3599-
有关详细信息,请参阅[定制资源](https://kubernetes-sigs.github.io/node-feature-discovery/v0.12/usage/customization-guide).
3633+
有关详细信息,请参阅[定制资源](https://kubernetes-sigs.github.io/node-feature-discovery/v0.12/usage/customization-guide)
36003634

36013635
<!--
36023636
### nfd.node.kubernetes.io/master.version
@@ -3620,8 +3654,8 @@ It is used for informative use only.
36203654
36213655
用于:节点
36223656
3623-
对于调度 NFD-[master](https://kubernetes-sigs.github.io/node-feature-discovery/stable/usage/nfd-master.html)的节点,
3624-
此注解记录 NFD-master 的版本。它仅用于提供信息。
3657+
对于调度 NFD-[master](https://kubernetes-sigs.github.io/node-feature-discovery/stable/usage/nfd-master.html)
3658+
的节点,此注解记录 NFD-master 的版本。它仅用于提供信息。
36253659
36263660
<!--
36273661
### nfd.node.kubernetes.io/worker.version
@@ -3669,7 +3703,7 @@ NFD uses this for an internal mechanism. You should not edit this annotation you
36693703
36703704
用于:节点
36713705
3672-
此注解记录由 [Node Feature Discovery](https://kubernetes-sigs.github.io/node-feature-discovery/) (NFD)
3706+
此注解记录由 [Node Feature Discovery](https://kubernetes-sigs.github.io/node-feature-discovery/)NFD
36733707
管理的以逗号分隔的节点特性标签列表。NFD 将其用于内部机制。你不应该自己编辑这个注解。
36743708
36753709
<!--
@@ -3694,7 +3728,7 @@ NFD uses this for an internal mechanism. You should not edit this annotation you
36943728
36953729
用于:节点
36963730
3697-
此注解记录由 [Node Feature Discovery](https://kubernetes-sigs.github.io/node-feature-discovery/) (NFD)
3731+
此注解记录由 [Node Feature Discovery](https://kubernetes-sigs.github.io/node-feature-discovery/)NFD
36983732
管理的以逗号分隔的[扩展资源](/zh-cn/docs/concepts/configuration/manage-resources-containers/#extended-resources)列表。
36993733
NFD 将其用于内部机制。你不应该自己编辑这个注解。
37003734
@@ -3727,7 +3761,7 @@ These Node Feature Discovery (NFD) labels or annotations only apply to
37273761
the nodes where NFD is running. To learn more about NFD and
37283762
its components go to its official [documentation](https://kubernetes-sigs.github.io/node-feature-discovery/stable/get-started/).
37293763
-->
3730-
这些节点特性发现(Node Feature Discovery, NFD)的标签或注解仅适用于运行 NFD 的节点。
3764+
这些节点特性发现(Node Feature DiscoveryNFD)的标签或注解仅适用于运行 NFD 的节点。
37313765
要了解关于 NFD 及其组件的信息,
37323766
请访问官方[文档](https://kubernetes-sigs.github.io/node-feature-discovery/stable/get-started/)。
37333767
{{< /note >}}
@@ -3910,7 +3944,7 @@ timeout in seconds.
39103944
39113945
用于:Service
39123946
3913-
如果你为 `type: LoadBalancer` 的服务配置[连接排空](#service-beta-kubernetes-io-aws-load-balancer-connection-draining-enabled),
3947+
如果你为 `type: LoadBalancer` 的 Service 配置[连接排空](#service-beta-kubernetes-io-aws-load-balancer-connection-draining-enabled),
39143948
且你使用 AWS 云服务,则集成机制将根据此注解来配置排空期。
39153949
你所设置的值决定了排空超时秒数。
39163950

@@ -4459,7 +4493,7 @@ There are two permitted values:
44594493
-->
44604494
示例:`service.beta.kubernetes.io/aws-load-balancer-type: external`
44614495

4462-
Kubernetes 官方与 AWS 的集成使用此注解来决定 AWS 云提供商是否应管理 `type: LoadBalancer` 的服务
4496+
Kubernetes 官方与 AWS 的集成使用此注解来决定 AWS 云提供商是否应管理 `type: LoadBalancer` 的 Service
44634497

44644498
有两个允许的值:
44654499

@@ -4487,7 +4521,7 @@ and your cluster has a working deployment of the AWS Load Balancer controller,
44874521
then the AWS Load Balancer controller attempts to deploy a load balancer based
44884522
on the Service specification.
44894523
-->
4490-
如果你在 AWS 上部署 `type: LoadBalancer` 的服务,并且没有设置任何
4524+
如果你在 AWS 上部署 `type: LoadBalancer` 的 Service,并且没有设置任何
44914525
`service.beta.kubernetes.io/aws-load-balancer-type` 注解,AWS 集成将部署经典的弹性负载均衡器。
44924526
这种行为是不带注解的默认行为,除非你另有指定。
44934527

@@ -4570,7 +4604,7 @@ for more information.
45704604
45714605
值**必须**是 `privileged`、`baseline` 或 `restricted` 之一,它们对应于
45724606
[Pod 安全标准](/zh-cn/docs/concepts/security/pod-security-standards) 级别。
4573-
特别地,`enforce` 标签 **禁止** 在带标签的 Namespace 中创建任何不符合指示级别要求的 Pod。
4607+
特别地,`enforce` 标签**禁止**在带标签的 Namespace 中创建任何不符合指示级别要求的 Pod。
45744608

45754609
请请参阅[在名字空间级别实施 Pod 安全性](/zh-cn/docs/concepts/security/pod-security-admission)了解更多信息。
45764610

0 commit comments

Comments
 (0)