Update container-environment.md

Sync doc about container-environment
This commit is contained in:
my-git9
2022-03-06 16:22:59 +08:00
committed by GitHub
parent c5651721b3
commit 6d01a88215
@@ -51,7 +51,7 @@ The Pod name and namespace are available as environment variables through the
[downward API](/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/).
User defined environment variables from the Pod definition are also available to the Container,
as are any environment variables specified statically in the Docker image.
as are any environment variables specified statically in the container image.
-->
### 容器信息
@@ -62,14 +62,13 @@ Pod 名称和命名空间可以通过
[下行 API](/zh/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/)
转换为环境变量。
Pod 定义中的用户所定义的环境变量也可在容器中使用,就像在 Docker 镜像中静态指定的任何环境变量一样。
Pod 定义中的用户所定义的环境变量也可在容器中使用,就像在 container 镜像中静态指定的任何环境变量一样。
<!--
### Cluster information
A list of all services that were running when a Container was created is available to that Container as environment variables.
This list is limited to services within the same namespace as the new Container's Pod and Kubernetes control plane services.
Those environment variables match the syntax of Docker links.
For a service named *foo* that maps to a Container named *bar*,
the following variables are defined:
@@ -78,7 +77,6 @@ the following variables are defined:
创建容器时正在运行的所有服务都可用作该容器的环境变量。
这里的服务仅限于新容器的 Pod 所在的名字空间中的服务,以及 Kubernetes 控制面的服务。
这些环境变量与 Docker 链接的语法相同。
对于名为 *foo* 的服务,当映射到名为 *bar* 的容器时,以下变量是被定义了的: