[zh] Fix links in concepts section (6)
This commit is contained in:
@@ -3,6 +3,14 @@ title: 容器环境
|
||||
content_type: concept
|
||||
weight: 20
|
||||
---
|
||||
<!--
|
||||
reviewers:
|
||||
- mikedanese
|
||||
- thockin
|
||||
title: Container Environment
|
||||
content_type: concept
|
||||
weight: 20
|
||||
-->
|
||||
|
||||
<!-- overview -->
|
||||
|
||||
@@ -11,9 +19,6 @@ This page describes the resources available to Containers in the Container envir
|
||||
-->
|
||||
本页描述了在容器环境里容器可用的资源。
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- body -->
|
||||
|
||||
<!--
|
||||
@@ -25,13 +30,14 @@ The Kubernetes Container environment provides several important resources to Con
|
||||
* Information about the Container itself.
|
||||
* Information about other objects in the cluster.
|
||||
-->
|
||||
## 容器环境
|
||||
## 容器环境 {#container-environment}
|
||||
|
||||
Kubernetes 的容器环境给容器提供了几个重要的资源:
|
||||
|
||||
* 文件系统,其中包含一个[镜像](/docs/concepts/containers/images/) 和一个或多个的[卷](/docs/concepts/storage/volumes/)。
|
||||
* 容器自身的信息。
|
||||
* 集群中其他对象的信息。
|
||||
* 文件系统,其中包含一个[镜像](/zh/docs/concepts/containers/images/)
|
||||
和一个或多个的[卷](/zh/docs/concepts/storage/volumes/)
|
||||
* 容器自身的信息
|
||||
* 集群中其他对象的信息
|
||||
|
||||
<!--
|
||||
### Container information
|
||||
@@ -49,9 +55,12 @@ as are any environment variables specified statically in the Docker image.
|
||||
-->
|
||||
### 容器信息
|
||||
|
||||
容器的 *hostname* 是它所运行在的 pod 的名称。它可以通过 `hostname` 命令或者调用 libc 中的 [`gethostname`](http://man7.org/linux/man-pages/man2/gethostname.2.html) 函数来获取。
|
||||
容器的 *hostname* 是它所运行在的 pod 的名称。它可以通过 `hostname` 命令或者调用 libc 中的
|
||||
[`gethostname`](https://man7.org/linux/man-pages/man2/gethostname.2.html) 函数来获取。
|
||||
|
||||
Pod 名称和命名空间可以通过 [downward API](/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/) 使用环境变量。
|
||||
Pod 名称和命名空间可以通过
|
||||
[下行 API](/zh/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/)
|
||||
转换为环境变量。
|
||||
|
||||
Pod 定义中的用户所定义的环境变量也可在容器中使用,就像在 Docker 镜像中静态指定的任何环境变量一样。
|
||||
|
||||
@@ -79,19 +88,18 @@ FOO_SERVICE_PORT=<the port the service is running on>
|
||||
Services have dedicated IP addresses and are available to the Container via DNS,
|
||||
if [DNS addon](http://releases.k8s.io/{{< param "githubbranch" >}}/cluster/addons/dns/) is enabled.
|
||||
-->
|
||||
Service 具有专用的 IP 地址。如果启用了 [DNS插件](http://releases.k8s.io/{{< param "githubbranch" >}}/cluster/addons/dns/),就可以在容器中通过 DNS 来访问。
|
||||
|
||||
|
||||
服务具有专用的 IP 地址。如果启用了
|
||||
[DNS插件](https://releases.k8s.io/{{< param "githubbranch" >}}/cluster/addons/dns/),
|
||||
可以在容器中通过 DNS 来访问服务。
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
|
||||
<!--
|
||||
* Learn more about [Container lifecycle hooks](/docs/concepts/containers/container-lifecycle-hooks/).
|
||||
* Get hands-on experience
|
||||
[attaching handlers to Container lifecycle events](/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/).
|
||||
-->
|
||||
* 学习更多有关[容器生命周期钩子](/docs/concepts/containers/container-lifecycle-hooks/)的知识。
|
||||
* 动手获得经验[将处理程序附加到容器生命周期事件](/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/)。
|
||||
* 学习更多有关[容器生命周期回调](/zh/docs/concepts/containers/container-lifecycle-hooks/)的知识
|
||||
* 动手[为容器生命周期事件添加处理程序](/zh/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user