[zh]Update concepts pages(part-1) for links with '/zh/' prefix, using new prefix '/zh-cn/'
This commit is contained in:
@@ -36,7 +36,7 @@ the change, then recreate the container to start from the updated image.
|
||||
-->
|
||||
|
||||
## 容器镜像 {#container-images}
|
||||
[容器镜像](/zh/docs/concepts/containers/images/)是一个随时可以运行的软件包,
|
||||
[容器镜像](/zh-cn/docs/concepts/containers/images/)是一个随时可以运行的软件包,
|
||||
包含运行应用程序所需的一切:代码和它需要的所有运行时、应用程序和系统库,以及一些基本设置的默认值。
|
||||
|
||||
根据设计,容器是不可变的:你不能更改已经运行的容器的代码。
|
||||
@@ -53,7 +53,7 @@ the change, then recreate the container to start from the updated image.
|
||||
* Read about [Pods](/docs/concepts/workloads/pods/)
|
||||
-->
|
||||
|
||||
* 进一步阅读[容器镜像](/zh/docs/concepts/containers/images/)
|
||||
* 进一步阅读 [Pods](/zh/docs/concepts/workloads/pods/)
|
||||
* 进一步阅读[容器镜像](/zh-cn/docs/concepts/containers/images/)
|
||||
* 进一步阅读 [Pods](/zh-cn/docs/concepts/workloads/pods/)
|
||||
|
||||
|
||||
|
||||
@@ -34,8 +34,8 @@ The Kubernetes Container environment provides several important resources to Con
|
||||
|
||||
Kubernetes 的容器环境给容器提供了几个重要的资源:
|
||||
|
||||
* 文件系统,其中包含一个[镜像](/zh/docs/concepts/containers/images/)
|
||||
和一个或多个的[卷](/zh/docs/concepts/storage/volumes/)
|
||||
* 文件系统,其中包含一个[镜像](/zh-cn/docs/concepts/containers/images/)
|
||||
和一个或多个的[卷](/zh-cn/docs/concepts/storage/volumes/)
|
||||
* 容器自身的信息
|
||||
* 集群中其他对象的信息
|
||||
|
||||
@@ -59,7 +59,7 @@ as are any environment variables specified statically in the container image.
|
||||
[`gethostname`](https://man7.org/linux/man-pages/man2/gethostname.2.html) 函数来获取。
|
||||
|
||||
Pod 名称和命名空间可以通过
|
||||
[下行 API](/zh/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/)
|
||||
[下行 API](/zh-cn/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/)
|
||||
转换为环境变量。
|
||||
|
||||
Pod 定义中的用户所定义的环境变量也可在容器中使用,就像在 container 镜像中静态指定的任何环境变量一样。
|
||||
@@ -100,7 +100,7 @@ if [DNS addon](https://releases.k8s.io/{{< param "fullversion" >}}/cluster/addon
|
||||
* Get hands-on experience
|
||||
[attaching handlers to Container lifecycle events](/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/)
|
||||
* 学习更多有关[容器生命周期回调](/zh-cn/docs/concepts/containers/container-lifecycle-hooks/)的知识
|
||||
* 动手[为容器生命周期事件添加处理程序](/zh-cn/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/)
|
||||
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ A more detailed description of the termination behavior can be found in
|
||||
[Termination of Pods](/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination).
|
||||
-->
|
||||
有关终止行为的更详细描述,请参见
|
||||
[终止 Pod](/zh/docs/concepts/workloads/pods/pod-lifecycle/#termination-of-pods)。
|
||||
[终止 Pod](/zh-cn/docs/concepts/workloads/pods/pod-lifecycle/#termination-of-pods)。
|
||||
|
||||
<!--
|
||||
### Hook handler implementations
|
||||
@@ -250,6 +250,6 @@ Events:
|
||||
[attaching handlers to Container lifecycle events](/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/).
|
||||
-->
|
||||
|
||||
* 进一步了解[容器环境](/zh/docs/concepts/containers/container-environment/)
|
||||
* 动手实践,[为容器生命周期事件添加处理程序](/zh/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/)
|
||||
* 进一步了解[容器环境](/zh-cn/docs/concepts/containers/container-environment/)
|
||||
* 动手实践,[为容器生命周期事件添加处理程序](/zh-cn/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/)
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ these values have:
|
||||
-->
|
||||
### 镜像拉取策略 {#image-pull-policy}
|
||||
|
||||
容器的 `imagePullPolicy` 和镜像的标签会影响 [kubelet](/zh/docs/reference/command-line-tools-reference/kubelet/) 尝试拉取(下载)指定的镜像。
|
||||
容器的 `imagePullPolicy` 和镜像的标签会影响 [kubelet](/zh-cn/docs/reference/command-line-tools-reference/kubelet/) 尝试拉取(下载)指定的镜像。
|
||||
|
||||
以下列表包含了 `imagePullPolicy` 可以设置的值,以及这些值的效果:
|
||||
|
||||
@@ -179,7 +179,7 @@ running the same code no matter what tag changes happen at the registry.
|
||||
镜像摘要唯一标识了镜像的特定版本,因此 Kubernetes 每次启动具有指定镜像名称和摘要的容器时,都会运行相同的代码。
|
||||
通过摘要指定镜像可固定你运行的代码,这样镜像仓库的变化就不会导致版本的混杂。
|
||||
|
||||
有一些第三方的[准入控制器](/zh/docs/reference/access-authn-authz/admission-controllers/)
|
||||
有一些第三方的[准入控制器](/zh-cn/docs/reference/access-authn-authz/admission-controllers/)
|
||||
在创建 Pod(和 Pod 模板)时产生变更,这样运行的工作负载就是根据镜像摘要,而不是标签来定义的。
|
||||
无论镜像仓库上的标签发生什么变化,你都想确保你所有的工作负载都运行相同的代码,那么指定镜像摘要会很有用。
|
||||
|
||||
@@ -247,7 +247,7 @@ If you would like to always force a pull, you can do one of the following:
|
||||
当你提交 Pod 时,Kubernetes 会将策略设置为 `Always`。
|
||||
- 省略 `imagePullPolicy` 和镜像的标签;
|
||||
当你提交 Pod 时,Kubernetes 会将策略设置为 `Always`。
|
||||
- 启用准入控制器 [AlwaysPullImages](/zh/docs/reference/access-authn-authz/admission-controllers/#alwayspullimages)。
|
||||
- 启用准入控制器 [AlwaysPullImages](/zh-cn/docs/reference/access-authn-authz/admission-controllers/#alwayspullimages)。
|
||||
|
||||
|
||||
<!--
|
||||
@@ -260,7 +260,7 @@ state because of `ImagePullBackOff`.
|
||||
### ImagePullBackOff
|
||||
|
||||
当 kubelet 使用容器运行时创建 Pod 时,容器可能因为 `ImagePullBackOff` 导致状态为
|
||||
[Waiting](/zh/docs/concepts/workloads/pods/pod-lifecycle/#container-state-waiting)。
|
||||
[Waiting](/zh-cn/docs/concepts/workloads/pods/pod-lifecycle/#container-state-waiting)。
|
||||
|
||||
<!--
|
||||
The status `ImagePullBackOff` means that a container could not start because Kubernetes
|
||||
@@ -366,7 +366,7 @@ For an example of configuring a private container image registry, see the
|
||||
task. That example uses a private registry in Docker Hub.
|
||||
-->
|
||||
有关配置私有容器镜像仓库的示例,请参阅任务
|
||||
[从私有镜像库中提取图像](/zh/docs/tasks/configure-pod-container/pull-image-private-registry)。
|
||||
[从私有镜像库中提取图像](/zh-cn/docs/tasks/configure-pod-container/pull-image-private-registry)。
|
||||
该示例使用 Docker Hub 中的私有注册表。
|
||||
|
||||
<!--
|
||||
@@ -560,7 +560,7 @@ command, you can import the credentials file as a Kubernetes
|
||||
如果你已经有 Docker 凭据文件,则可以将凭据文件导入为 Kubernetes
|
||||
{{< glossary_tooltip text="Secret" term_id="secret" >}},
|
||||
而不是执行上面的命令。
|
||||
[基于已有的 Docker 凭据创建 Secret](/zh/docs/tasks/configure-pod-container/pull-image-private-registry/#registry-secret-existing-credentials)
|
||||
[基于已有的 Docker 凭据创建 Secret](/zh-cn/docs/tasks/configure-pod-container/pull-image-private-registry/#registry-secret-existing-credentials)
|
||||
解释了如何完成这一操作。
|
||||
|
||||
<!--
|
||||
@@ -628,10 +628,10 @@ will be merged.
|
||||
-->
|
||||
你需要对使用私有仓库的每个 Pod 执行以上操作。
|
||||
不过,设置该字段的过程也可以通过为
|
||||
[服务账号](/zh/docs/tasks/configure-pod-container/configure-service-account/)
|
||||
[服务账号](/zh-cn/docs/tasks/configure-pod-container/configure-service-account/)
|
||||
资源设置 `imagePullSecrets` 来自动完成。
|
||||
有关详细指令可参见
|
||||
[将 ImagePullSecrets 添加到服务账号](/zh/docs/tasks/configure-pod-container/configure-service-account/#add-imagepullsecrets-to-a-service-account)。
|
||||
[将 ImagePullSecrets 添加到服务账号](/zh-cn/docs/tasks/configure-pod-container/configure-service-account/#add-imagepullsecrets-to-a-service-account)。
|
||||
|
||||
你也可以将此方法与节点级别的 `.docker/config.json` 配置结合使用。
|
||||
来自不同来源的凭据会被合并。
|
||||
@@ -685,7 +685,7 @@ common use cases and suggested solutions.
|
||||
- Move sensitive data into a "Secret" resource, instead of packaging it in an image.
|
||||
-->
|
||||
3. 集群使用专有镜像,且有些镜像需要更严格的访问控制
|
||||
- 确保 [AlwaysPullImages 准入控制器](/zh/docs/reference/access-authn-authz/admission-controllers/#alwayspullimages)被启用。否则,所有 Pod 都可以使用所有镜像。
|
||||
- 确保 [AlwaysPullImages 准入控制器](/zh-cn/docs/reference/access-authn-authz/admission-controllers/#alwayspullimages)被启用。否则,所有 Pod 都可以使用所有镜像。
|
||||
- 确保将敏感数据存储在 Secret 资源中,而不是将其打包在镜像里
|
||||
|
||||
<!--
|
||||
@@ -696,7 +696,7 @@ common use cases and suggested solutions.
|
||||
- The tenant adds that secret to imagePullSecrets of each namespace.
|
||||
-->
|
||||
4. 集群是多租户的并且每个租户需要自己的私有仓库
|
||||
- 确保 [AlwaysPullImages 准入控制器](/zh/docs/reference/access-authn-authz/admission-controllers/#alwayspullimages)。否则,所有租户的所有的 Pod 都可以使用所有镜像。
|
||||
- 确保 [AlwaysPullImages 准入控制器](/zh-cn/docs/reference/access-authn-authz/admission-controllers/#alwayspullimages)。否则,所有租户的所有的 Pod 都可以使用所有镜像。
|
||||
- 为私有仓库启用鉴权
|
||||
- 为每个租户生成访问仓库的凭据,放置在 Secret 中,并将 Secrert 发布到各租户的命名空间下。
|
||||
- 租户将 Secret 添加到每个名字空间中的 imagePullSecrets
|
||||
@@ -716,4 +716,4 @@ Kubelet will merge any `imagePullSecrets` into a single virtual `.docker/config.
|
||||
* Learn about [container image garbage collection](/docs/concepts/architecture/garbage-collection/#container-image-garbage-collection).
|
||||
-->
|
||||
* 阅读 [OCI Image Manifest 规范](https://github.com/opencontainers/image-spec/blob/master/manifest.md)。
|
||||
* 了解[容器镜像垃圾收集](/zh/docs/concepts/architecture/garbage-collection/#container-image-garbage-collection)。
|
||||
* 了解[容器镜像垃圾收集](/zh-cn/docs/concepts/architecture/garbage-collection/#container-image-garbage-collection)。
|
||||
|
||||
@@ -92,7 +92,7 @@ The configurations have a corresponding `handler` name, referenced by the Runtim
|
||||
handler must be a valid [DNS label name](/docs/concepts/overview/working-with-objects/names/#dns-label-names).
|
||||
-->
|
||||
所有这些配置都具有相应的 `handler` 名,并被 RuntimeClass 引用。
|
||||
handler 必须是有效的 [DNS 标签名](/zh/docs/concepts/overview/working-with-objects/names/#dns-label-names)。
|
||||
handler 必须是有效的 [DNS 标签名](/zh-cn/docs/concepts/overview/working-with-objects/names/#dns-label-names)。
|
||||
|
||||
<!--
|
||||
### 2. Create the corresponding RuntimeClass resources
|
||||
@@ -131,7 +131,7 @@ restricted to the cluster administrator. This is typically the default. See
|
||||
-->
|
||||
{{< note >}}
|
||||
建议将 RuntimeClass 写操作(create、update、patch 和 delete)限定于集群管理员使用。
|
||||
通常这是默认配置。参阅[授权概述](/zh/docs/reference/access-authn-authz/authorization/)了解更多信息。
|
||||
通常这是默认配置。参阅[授权概述](/zh-cn/docs/reference/access-authn-authz/authorization/)了解更多信息。
|
||||
{{< /note >}}
|
||||
|
||||
<!--
|
||||
@@ -164,8 +164,8 @@ error message.
|
||||
-->
|
||||
这一设置会告诉 kubelet 使用所指的 RuntimeClass 来运行该 pod。
|
||||
如果所指的 RuntimeClass 不存在或者 CRI 无法运行相应的 handler,
|
||||
那么 pod 将会进入 `Failed` 终止[阶段](/zh/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase)。
|
||||
你可以查看相应的[事件](/zh/docs/tasks/debug/debug-application/debug-running-pod/),
|
||||
那么 pod 将会进入 `Failed` 终止[阶段](/zh-cn/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase)。
|
||||
你可以查看相应的[事件](/zh-cn/docs/tasks/debug/debug-application/debug-running-pod/),
|
||||
获取执行过程中的错误信息。
|
||||
|
||||
<!--
|
||||
@@ -182,7 +182,7 @@ For more details on setting up CRI runtimes, see [CRI installation](/docs/setup/
|
||||
### CRI 配置 {#cri-configuration}
|
||||
|
||||
关于如何安装 CRI 运行时,请查阅
|
||||
[CRI 安装](/zh/docs/setup/production-environment/container-runtimes/)。
|
||||
[CRI 安装](/zh-cn/docs/setup/production-environment/container-runtimes/)。
|
||||
|
||||
#### {{< glossary_tooltip term_id="containerd" >}}
|
||||
|
||||
@@ -267,7 +267,7 @@ To learn more about configuring the node selector and tolerations, see
|
||||
[Assigning Pods to Nodes](/docs/concepts/configuration/assign-pod-node/).
|
||||
-->
|
||||
更多有关 node selector 和 tolerations 的配置信息,请查阅
|
||||
[将 Pod 分派到节点](/zh/docs/concepts/scheduling-eviction/assign-pod-node/)。
|
||||
[将 Pod 分派到节点](/zh-cn/docs/concepts/scheduling-eviction/assign-pod-node/)。
|
||||
|
||||
<!--
|
||||
### Pod Overhead
|
||||
@@ -300,5 +300,5 @@ Pod 开销通过 RuntimeClass 的 `overhead` 字段定义。
|
||||
-->
|
||||
- [RuntimeClass 设计](https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/585-runtime-class/README.md)
|
||||
- [RuntimeClass 调度设计](https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/585-runtime-class/README.md#runtimeclass-scheduling)
|
||||
- 阅读关于 [Pod 开销](/zh/docs/concepts/scheduling-eviction/pod-overhead/) 的概念
|
||||
- 阅读关于 [Pod 开销](/zh-cn/docs/concepts/scheduling-eviction/pod-overhead/) 的概念
|
||||
- [PodOverhead 特性设计](https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/688-pod-overhead)
|
||||
|
||||
Reference in New Issue
Block a user