From d5c36b3dac99edde5fedd807837bed384683a890 Mon Sep 17 00:00:00 2001 From: cuisongliu Date: Tue, 14 Jul 2020 12:53:03 +0800 Subject: [PATCH 1/3] docs(master): fix init container not support lifecycle and probe Signed-off-by: cuisongliu --- content/zh/docs/concepts/workloads/pods/init-containers.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/zh/docs/concepts/workloads/pods/init-containers.md b/content/zh/docs/concepts/workloads/pods/init-containers.md index 0600c36b30..06b2edf334 100644 --- a/content/zh/docs/concepts/workloads/pods/init-containers.md +++ b/content/zh/docs/concepts/workloads/pods/init-containers.md @@ -74,7 +74,7 @@ If you specify multiple init containers for a Pod, Kubelet runs each init contai Init 容器支持应用容器的全部字段和特性,包括资源限制、数据卷和安全设置。 然而,Init 容器对资源请求和限制的处理稍有不同,在下面 [资源](#资源) 处有说明。 -同时 Init 容器不支持 Readiness Probe,因为它们必须在 Pod 就绪之前运行完成。 +同时 Init 容器不支持 Lifecycle、LivenessProbe、ReadinessProbe和StartupProbe,因为它们必须在 Pod 就绪之前运行完成。 如果为一个 Pod 指定了多个 Init 容器,这些容器会按顺序逐个运行。每个 Init 容器必须运行成功,下一个才能够运行。当所有的 Init 容器运行完成时,Kubernetes 才会为 Pod 初始化应用容器并像平常一样运行。 @@ -135,7 +135,7 @@ Here are some ideas for how to use init containers: * 在启动应用容器之前等一段时间,使用类似命令: - sleep 60 + sleep 60 * 克隆 Git 仓库到 {{< glossary_tooltip text="Volume" term_id="volume" >}}。 * 将配置值放到配置文件中,运行模板工具为主应用容器动态地生成配置文件。例如,在配置文件中存放 POD_IP 值,并使用 Jinja 生成主应用配置文件。 @@ -351,7 +351,7 @@ During the startup of a Pod, each init container starts in order, after the netw A Pod cannot be `Ready` until all init containers have succeeded. The ports on an init container are not aggregated under a Service. A Pod that is initializing is in the `Pending` state but should have a condition `Initializing` set to true. -If the Pod [restarts](#pod-restart-reasons), or is restarted, all init containers must execute again. +If the Pod [restarts](#pod-restart-reasons), or is restarted, all init containers must execute again. Changes to the init container spec are limited to the container image field. Altering an init container image field is equivalent to restarting the Pod. From ab329b0ab0ed8ec6499dc215e6080a787552653d Mon Sep 17 00:00:00 2001 From: cuisongliu Date: Tue, 14 Jul 2020 14:35:46 +0800 Subject: [PATCH 2/3] docs(master): fix init container not support lifecycle and probe and sync en docs Signed-off-by: cuisongliu --- content/zh/docs/concepts/workloads/pods/init-containers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/zh/docs/concepts/workloads/pods/init-containers.md b/content/zh/docs/concepts/workloads/pods/init-containers.md index 06b2edf334..c0fe6cf37e 100644 --- a/content/zh/docs/concepts/workloads/pods/init-containers.md +++ b/content/zh/docs/concepts/workloads/pods/init-containers.md @@ -66,7 +66,7 @@ Init 容器的状态在 `status.initContainerStatuses` 字段中以容器状态 From 35b0c8b3db345e2d415f444b5f0054c96332b2ec Mon Sep 17 00:00:00 2001 From: cuisongliu Date: Tue, 14 Jul 2020 18:28:31 +0800 Subject: [PATCH 3/3] Update content/zh/docs/concepts/workloads/pods/init-containers.md Co-authored-by: Qiming Teng --- content/zh/docs/concepts/workloads/pods/init-containers.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/content/zh/docs/concepts/workloads/pods/init-containers.md b/content/zh/docs/concepts/workloads/pods/init-containers.md index c0fe6cf37e..814891bcd0 100644 --- a/content/zh/docs/concepts/workloads/pods/init-containers.md +++ b/content/zh/docs/concepts/workloads/pods/init-containers.md @@ -74,7 +74,7 @@ If you specify multiple init containers for a Pod, Kubelet runs each init contai Init 容器支持应用容器的全部字段和特性,包括资源限制、数据卷和安全设置。 然而,Init 容器对资源请求和限制的处理稍有不同,在下面 [资源](#资源) 处有说明。 -同时 Init 容器不支持 Lifecycle、LivenessProbe、ReadinessProbe和StartupProbe,因为它们必须在 Pod 就绪之前运行完成。 +同时 Init 容器不支持 `lifecycle`、`livenessProbe`、`readinessProbe` 和 `startupProbe`,因为它们必须在 Pod 就绪之前运行完成。 如果为一个 Pod 指定了多个 Init 容器,这些容器会按顺序逐个运行。每个 Init 容器必须运行成功,下一个才能够运行。当所有的 Init 容器运行完成时,Kubernetes 才会为 Pod 初始化应用容器并像平常一样运行。 @@ -445,4 +445,3 @@ Pod重启导致 Init 容器重新执行,主要有如下几个原因: * 阅读[创建包含 Init 容器的 Pod](/docs/tasks/configure-pod-container/configure-pod-initialization/#create-a-pod-that-has-an-init-container) * 学习如何[调测 Init 容器](/docs/tasks/debug-application-cluster/debug-init-containers/) -