Skip to content

Commit

Permalink
[zh] sync concepts/workloads/pods/downward-api.md
Browse files Browse the repository at this point in the history
  • Loading branch information
KKtheGhost committed Aug 26, 2023
1 parent 6f562f6 commit 1a50f23
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions content/zh-cn/docs/concepts/workloads/pods/downward-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ You can pass information from available Container-level fields using
<!--
### Information available via `fieldRef` {#downwardapi-fieldRef}
For most Pod-level fields, you can provide them to a container either as
For some Pod-level fields, you can provide them to a container either as
an environment variable or using a `downwardAPI` volume. The fields available
via either mechanism are:
-->
### 可通过 `fieldRef` 获得的信息 {#downwardapi-fieldRef}

对于大多数 Pod 级别的字段,你可以将它们作为环境变量或使用 `downwardAPI` 卷提供给容器。
对于某些 Pod 级别的字段,你可以将它们作为环境变量或使用 `downwardAPI` 卷提供给容器。
通过这两种机制可用的字段有:

<!--
Expand Down Expand Up @@ -152,13 +152,29 @@ The following information is available through environment variables
`status.hostIP`
: Pod 所在节点的主 IP 地址

<!--
`status.hostIPs`
: the IP addresses is a dual-stack version of `status.hostIP`, the first is always the same as `status.hostIP`.
The field is available if you enable the `PodHostIPs` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/).
-->
`status.hostIPs`
: 这组 IP 地址是 `status.hostIP` 的双协议栈版本,第一个 IP 始终与 `status.hostIP` 相同。
该字段在启用了 `PodHostIPs` [特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)后可用。

<!--
`status.podIP`
: the pod's primary IP address (usually, its IPv4 address)
-->
`status.podIP`
: Pod 的主 IP 地址(通常是其 IPv4 地址)

<!--
`status.podIPs`
: the IP addresses is a dual-stack version of `status.podIP`, the first is always the same as `status.podIP`
-->
`status.podIPs`
: 这组 IP 地址是 `status.podIP` 的双协议栈版本, 第一个 IP 始终与 `status.podIP` 相同。

<!--
The following information is available through a `downwardAPI` volume
`fieldRef`, **but not as environment variables**:
Expand Down

0 comments on commit 1a50f23

Please sign in to comment.