Skip to content

Commit d63dbd7

Browse files
authored
[zh]update file content/zh/docs/reference/labels-annotations-taints/_index.md (#33068)
* [zh]update file content/zh/docs/reference/labels-annotations-taints/_index.md * [zh]update file content/zh/docs/reference/labels-annotations-taints/_index.md * [zh]update file content/zh/docs/reference/labels-annotations-taints/_index.md * [zh]update file content/zh/docs/reference/labels-annotations-taints/_index.md * [zh]update file content/zh/docs/reference/labels-annotations-taints/_index.md * [zh]update file content/zh/docs/reference/labels-annotations-taints/_index.md * [zh]update file content/zh/docs/reference/labels-annotations-taints/_index.md * [zh]update file content/zh/docs/reference/labels-annotations-taints/_index.md * [zh]update file content/zh/docs/reference/labels-annotations-taints/_index.md * [zh]update file content/zh/docs/reference/labels-annotations-taints/_index.md
1 parent 359c760 commit d63dbd7

File tree

1 file changed

+225
-10
lines changed
  • content/zh/docs/reference/labels-annotations-taints

1 file changed

+225
-10
lines changed

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

Lines changed: 225 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,151 @@ Kubernetes 将所有标签和注解保留在 kubernetes.io Namespace中。
2626
<!--
2727
## Labels, annotations and taints used on API objects
2828
29+
### app.kubernetes.io/component
30+
31+
Example: `app.kubernetes.io/component=database`
32+
33+
Used on: All Objects
34+
35+
The component within the architecture.
36+
37+
One of the [recommended labels](/docs/concepts/overview/working-with-objects/common-labels/#labels).
38+
-->
39+
## API 对象上使用的标签、注解和污点
40+
41+
### app.kubernetes.io/component
42+
43+
例子: `app.kubernetes.io/component=database`
44+
45+
用于: 所有对象
46+
47+
架构中的组件。
48+
49+
[推荐标签](/zh/docs/concepts/overview/working-with-objects/common-labels/#labels)之一。
50+
51+
<!-- ### app.kubernetes.io/created-by
52+
53+
Example: `app.kubernetes.io/created-by=controller-manager`
54+
55+
Used on: All Objects
56+
57+
The controller/user who created this resource.
58+
59+
One of the [recommended labels](/docs/concepts/overview/working-with-objects/common-labels/#labels). -->
60+
### app.kubernetes.io/created-by
61+
62+
示例:`app.kubernetes.io/created-by=controller-manager`
63+
64+
用于:所有对象
65+
66+
创建此资源的控制器/用户。
67+
68+
[推荐标签](/zh/docs/concepts/overview/working-with-objects/common-labels/#labels)之一。
69+
70+
<!-- ### app.kubernetes.io/instance
71+
72+
Example: `app.kubernetes.io/instance=mysql-abcxzy`
73+
74+
Used on: All Objects
75+
76+
A unique name identifying the instance of an application.
77+
78+
One of the [recommended labels](/docs/concepts/overview/working-with-objects/common-labels/#labels). -->
79+
### app.kubernetes.io/instance
80+
81+
示例:`app.kubernetes.io/instance=mysql-abcxzy`
82+
83+
用于:所有对象
84+
85+
标识应用实例的唯一名称。
86+
87+
[推荐标签](/zh/docs/concepts/overview/working-with-objects/common-labels/#labels)之一。
88+
89+
<!-- ### app.kubernetes.io/managed-by
90+
91+
Example: `app.kubernetes.io/managed-by=helm`
92+
93+
Used on: All Objects
94+
95+
The tool being used to manage the operation of an application.
96+
97+
One of the [recommended labels](/docs/concepts/overview/working-with-objects/common-labels/#labels). -->
98+
### app.kubernetes.io/managed-by
99+
100+
示例:`app.kubernetes.io/managed-by=helm`
101+
102+
用于:所有对象
103+
104+
用于管理应用操作的工具。
105+
106+
[推荐标签](/zh/docs/concepts/overview/working-with-objects/common-labels/#labels)之一。
107+
108+
<!-- ### app.kubernetes.io/name
109+
110+
Example: `app.kubernetes.io/name=mysql`
111+
112+
Used on: All Objects
113+
114+
The name of the application.
115+
116+
One of the [recommended labels](/docs/concepts/overview/working-with-objects/common-labels/#labels). -->
117+
118+
### app.kubernetes.io/name
119+
120+
示例:`app.kubernetes.io/name=mysql`
121+
122+
用于:所有对象
123+
124+
应用的名称。
125+
126+
[推荐标签](/zh/docs/concepts/overview/working-with-objects/common-labels/#labels)之一。
127+
128+
<!-- ### app.kubernetes.io/part-of
129+
130+
Example: `app.kubernetes.io/part-of=wordpress`
131+
132+
Used on: All Objects
133+
134+
The name of a higher level application this one is part of.
135+
136+
One of the [recommended labels](/docs/concepts/overview/working-with-objects/common-labels/#labels). -->
137+
### app.kubernetes.io/part-of
138+
139+
示例:`app.kubernetes.io/part-of=wordpress`
140+
141+
用于:所有对象
142+
143+
此应用所属的更高级别应用的名称。
144+
145+
[推荐标签](/zh/docs/concepts/overview/working-with-objects/common-labels/#labels)之一。
146+
147+
<!-- ### app.kubernetes.io/version
148+
149+
Example: `app.kubernetes.io/version="5.7.21"`
150+
151+
Used on: All Objects
152+
153+
The current version of the application (e.g., a semantic version, revision hash, etc.).
154+
155+
One of the [recommended labels](/docs/concepts/overview/working-with-objects/common-labels/#labels). -->
156+
### app.kubernetes.io/version
157+
158+
示例:`app.kubernetes.io/version="5.7.21"`
159+
160+
用于:所有对象
161+
162+
应用的当前版本(例如,语义版本、修订哈希等)。
163+
164+
[推荐标签](/zh/docs/concepts/overview/working-with-objects/common-labels/#labels)之一。
165+
166+
<!--
29167
### kubernetes.io/arch
30168
31169
Example: `kubernetes.io/arch=amd64`
32170
33171
Used on: Node
34172
35-
The Kubelet populates this with `runtime.GOARCH` as defined by Go. This can be handy if you are mixing arm and x86 nodes.
36-
-->
37-
## API 对象上使用的标签、注解和污点
173+
The Kubelet populates this with `runtime.GOARCH` as defined by Go. This can be handy if you are mixing arm and x86 nodes. -->
38174

39175
### kubernetes.io/arch {#kubernetes-io-arch}
40176

@@ -185,17 +321,92 @@ Used on: Pod
185321
186322
This annotation is used to set [Pod Deletion Cost](/docs/concepts/workloads/controllers/replicaset/#pod-deletion-cost)
187323
which allows users to influence ReplicaSet downscaling order. The annotation parses into an `int32` type.
188-
189-
### beta.kubernetes.io/instance-type (deprecated)
190324
-->
191325
### controller.kubernetes.io/pod-deletion-cost {#pod-deletion-cost}
192326

193327
例子:`controller.kubernetes.io/pod-deletion-cost=10`
194328

195329
用于:Pod
196330

197-
该注解用于设置 [Pod 删除成本](/docs/concepts/workloads/controllers/replicaset/#pod-deletion-cost) 允许用户影响 ReplicaSet 缩减顺序。注解解析为 `int32` 类型。
331+
该注解用于设置 [Pod 删除成本](/docs/concepts/workloads/controllers/replicaset/#pod-deletion-cost)允许用户影响 ReplicaSet 缩减顺序。注解解析为 `int32` 类型。
332+
333+
<!--
334+
### kubernetes.io/ingress-bandwidth
335+
336+
Ingress traffic shaping annotation is an experimental feature.
337+
If you want to enable traffic shaping support, you must add the `bandwidth` plugin to your CNI configuration file (default `/etc/cni/net.d`) and
338+
ensure that the binary is included in your CNI bin dir (default `/opt/cni/bin`).
339+
340+
Example: `kubernetes.io/ingress-bandwidth: 10M`
341+
342+
Used on: Pod
343+
344+
You can apply quality-of-service traffic shaping to a pod and effectively limit its available bandwidth.
345+
Ingress traffic (to the pod) is handled by shaping queued packets to effectively handle data.
346+
To limit the bandwidth on a pod, write an object definition JSON file and specify the data traffic
347+
speed using `kubernetes.io/ingress-bandwidth` annotation. The unit used for specifying ingress
348+
rate is bits per second, as a [Quantity](/docs/reference/kubernetes-api/common-definitions/quantity/).
349+
For example, `10M` means 10 megabits per second.
350+
-->
198351

352+
### kubernetes.io/ingress-bandwidth
353+
354+
{{< note >}}
355+
入站流量控制注解是一项实验性功能。
356+
如果要启用流量控制支持,必须将`bandwidth`插件添加到 CNI 配置文件(默认为`/etc/cni/net.d`
357+
并确保二进制文件包含在你的 CNI bin 目录中(默认为`/opt/cni/bin`)。
358+
{{< /note >}}
359+
360+
示例:`kubernetes.io/ingress-bandwidth: 10M`
361+
362+
用于:Pod
363+
364+
你可以对 Pod 应用服务质量流量控制并有效限制其可用带宽。
365+
入站流量(到 Pod)通过控制排队的数据包来处理,以有效地处理数据。
366+
要限制 Pod 的带宽,请编写对象定义 JSON 文件并使用 `kubernetes.io/ingress-bandwidth`
367+
注解指定数据流量速度。 用于指定入站的速率单位是每秒,
368+
作为[量纲(Quantity)](/zh/docs/reference/kubernetes-api/common-definitions/quantity/)
369+
例如,`10M`表示每秒 10 兆比特。
370+
371+
<!--
372+
### kubernetes.io/egress-bandwidth
373+
374+
Egress traffic shaping annotation is an experimental feature.
375+
If you want to enable traffic shaping support, you must add the `bandwidth` plugin to your CNI configuration file (default `/etc/cni/net.d`) and
376+
ensure that the binary is included in your CNI bin dir (default `/opt/cni/bin`).
377+
378+
Example: `kubernetes.io/egress-bandwidth: 10M`
379+
380+
Used on: Pod
381+
382+
Egress traffic (from the pod) is handled by policing, which simply drops packets in excess of the configured rate.
383+
The limits you place on a pod do not affect the bandwidth of other pods.
384+
To limit the bandwidth on a pod, write an object definition JSON file and specify the data traffic
385+
speed using `kubernetes.io/egress-bandwidth` annotation. The unit used for specifying egress
386+
rate is bits per second, as a [Quantity](/docs/reference/kubernetes-api/common-definitions/quantity/).
387+
For example, `10M` means 10 megabits per second.
388+
-->
389+
390+
### kubernetes.io/egress-bandwidth
391+
392+
{{< note >}}
393+
出站流量控制注解是一项实验性功能。
394+
如果要启用流量控制支持,必须将`bandwidth`插件添加到 CNI 配置文件(默认为`/etc/cni/net.d`
395+
并确保二进制文件包含在你的 CNI bin 目录中(默认为`/opt/cni/bin`)。
396+
{{< /note >}}
397+
398+
示例:`kubernetes.io/egress-bandwidth: 10M`
399+
400+
用于:Pod
401+
402+
出站流量(来自 pod)由策略控制,策略只是丢弃超过配置速率的数据包。
403+
你为一个 Pod 所设置的限制不会影响其他 Pod 的带宽。
404+
要限制 Pod 的带宽,请编写对象定义 JSON 文件并使用 `kubernetes.io/egress-bandwidth` 注解指定数据流量速度。
405+
用于指定出站的速率单位是每秒比特数,
406+
[量纲(Quantity)](/zh/docs/reference/kubernetes-api/common-definitions/quantity/)的形式给出。
407+
例如,`10M` 表示每秒 10 兆比特。
408+
409+
<!-- ### beta.kubernetes.io/instance-type (deprecated) -->
199410
### beta.kubernetes.io/instance-type (已弃用) {#beta-kubernetes-io-instance-type}
200411

201412
<!--
@@ -1025,16 +1236,20 @@ seccomp 配置文件应用于 Pod 或其容器的步骤。
10251236
<!--
10261237
## Annotations used for audit
10271238
1028-
- [`pod-security.kubernetes.io/exempt`](/docs/reference/labels-annotations-taints/audit-annotations/#pod-security-kubernetes-io-exempt)
1029-
- [`pod-security.kubernetes.io/enforce-policy`](/docs/reference/labels-annotations-taints/audit-annotations/#pod-security-kubernetes-io-enforce-policy)
1239+
- [`authorization.k8s.io/decision`](/docs/reference/labels-annotations-taints/audit-annotations/#authorization-k8s-io-decision)
1240+
- [`authorization.k8s.io/reason`](/docs/reference/labels-annotations-taints/audit-annotations/#authorization-k8s-io-reason)
10301241
- [`pod-security.kubernetes.io/audit-violations`](/docs/reference/labels-annotations-taints/audit-annotations/#pod-security-kubernetes-io-audit-violations)
1242+
- [`pod-security.kubernetes.io/enforce-policy`](/docs/reference/labels-annotations-taints/audit-annotations/#pod-security-kubernetes-io-enforce-policy)
1243+
- [`pod-security.kubernetes.io/exempt`](/docs/reference/labels-annotations-taints/audit-annotations/#pod-security-kubernetes-io-exempt)
10311244
10321245
See more details on the [Audit Annotations](/docs/reference/labels-annotations-taints/audit-annotations/) page.
10331246
-->
10341247
## 用于审计的注解 {#annonations-used-for-audit}
10351248

1036-
- [`pod-security.kubernetes.io/exempt`](/zh/docs/reference/labels-annotations-taints/audit-annotations/#pod-security-kubernetes-io-exempt)
1037-
- [`pod-security.kubernetes.io/enforce-policy`](/zh/zh/docs/reference/labels-annotations-taints/audit-annotations/#pod-security-kubernetes-io-enforce-policy)
1249+
- [`authorization.k8s.io/decision`](/zh/docs/reference/labels-annotations-taints/audit-annotations/#authorization-k8s-io-decision)
1250+
- [`authorization.k8s.io/reason`](/zh/docs/reference/labels-annotations-taints/audit-annotations/#authorization-k8s-io-reason)
10381251
- [`pod-security.kubernetes.io/audit-violations`](/zh/docs/reference/labels-annotations-taints/audit-annotations/#pod-security-kubernetes-io-audit-violations)
1252+
- [`pod-security.kubernetes.io/enforce-policy`](/zh/zh/docs/reference/labels-annotations-taints/audit-annotations/#pod-security-kubernetes-io-enforce-policy)
1253+
- [`pod-security.kubernetes.io/exempt`](/zh/docs/reference/labels-annotations-taints/audit-annotations/#pod-security-kubernetes-io-exempt)
10391254

10401255
[审计注解](/zh/docs/reference/labels-annotations-taints/audit-annotations/)页面上查看更多详细信息。

0 commit comments

Comments
 (0)