You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/zh/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information.md
+14-11Lines changed: 14 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -293,36 +293,39 @@ variables and `downwardAPI` volumes:
293
293
* Information available via `fieldRef`:
294
294
* `metadata.name` - the pod's name
295
295
* `metadata.namespace` - the pod's namespace
296
-
* `metadata.uid` - the pod's UID, available since v1.8.0-alpha.2
297
-
* `metadata.labels['<KEY>']` - the value of the pod's label `<KEY>` (for example, `metadata.labels['mylabel']`); available in Kubernetes 1.9+
298
-
* `metadata.annotations['<KEY>']` - the value of the pod's annotation `<KEY>` (for example, `metadata.annotations['myannotation']`); available in Kubernetes 1.9+
296
+
* `metadata.uid` - the pod's UID
297
+
* `metadata.labels['<KEY>']` - the value of the pod's label `<KEY>` (for example, `metadata.labels['mylabel']`)
298
+
* `metadata.annotations['<KEY>']` - the value of the pod's annotation `<KEY>` (for example, `metadata.annotations['myannotation']`)
299
299
-->
300
300
下面这些信息可以通过环境变量和 `downwardAPI` 卷提供给容器:
301
301
302
302
* 能通过 `fieldRef` 获得的:
303
303
*`metadata.name` - Pod 名称
304
304
*`metadata.namespace` - Pod 名字空间
305
-
*`metadata.uid` - Pod的UID, 版本要求 v1.8.0-alpha.2
306
-
*`metadata.labels['<KEY>']` - Pod 标签 `<KEY>` 的值 (例如, `metadata.labels['mylabel']`);
307
-
版本要求 Kubernetes 1.9+
308
-
*`metadata.annotations['<KEY>']` - Pod 的注解 `<KEY>` 的值(例如, `metadata.annotations['myannotation']`); 版本要求 Kubernetes 1.9+
305
+
*`metadata.uid` - Pod 的 UID
306
+
*`metadata.labels['<KEY>']` - Pod 标签 `<KEY>` 的值 (例如, `metadata.labels['mylabel']`)
307
+
*`metadata.annotations['<KEY>']` - Pod 的注解 `<KEY>` 的值(例如, `metadata.annotations['myannotation']`)
309
308
310
309
<!--
311
310
* Information available via `resourceFieldRef`:
312
311
* A Container's CPU limit
313
312
* A Container's CPU request
314
313
* A Container's memory limit
315
314
* A Container's memory request
316
-
* A Container's ephemeral-storage limit, available since v1.8.0-beta.0
317
-
* A Container's ephemeral-storage request, available since v1.8.0-beta.0
315
+
* A Container's hugepages limit (providing that the `DownwardAPIHugePages` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) is enabled)
316
+
* A Container's hugepages request (providing that the `DownwardAPIHugePages` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) is enabled)
0 commit comments