Skip to content

Commit b80b40d

Browse files
committed
[zh] sync /controllers/job.md
1 parent 144c6e9 commit b80b40d

File tree

1 file changed

+14
-8
lines changed
  • content/zh-cn/docs/concepts/workloads/controllers

1 file changed

+14
-8
lines changed

content/zh-cn/docs/concepts/workloads/controllers/job.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,8 @@ Jobs with _fixed completion count_ - that is, jobs that have non null
364364
- As part of the Pod hostname, following the pattern `$(job-name)-$(index)`.
365365
When you use an Indexed Job in combination with a
366366
{{< glossary_tooltip term_id="Service" >}}, Pods within the Job can use
367-
the deterministic hostnames to address each other via DNS.
367+
the deterministic hostnames to address each other via DNS. For more information about
368+
how to configure this, see [Job with Pod-to-Pod Communication](/docs/tasks/job/job-with-pod-to-pod-communication/).
368369
- From the containerized task, in the environment variable `JOB_COMPLETION_INDEX`.
369370
370371
The Job is considered complete when there is one successfully completed Pod
@@ -382,6 +383,7 @@ Jobs with _fixed completion count_ - that is, jobs that have non null
382383
- 作为 Pod 主机名的一部分,遵循模式 `$(job-name)-$(index)`
383384
当你同时使用带索引的 Job(Indexed Job)与 {{< glossary_tooltip term_id="Service" >}},
384385
Job 中的 Pod 可以通过 DNS 使用确切的主机名互相寻址。
386+
有关如何配置的更多信息,请参阅[带 Pod 间通信的 Job](/zh-cn/docs/tasks/job/job-with-pod-to-pod-communication/)
385387
- 对于容器化的任务,在环境变量 `JOB_COMPLETION_INDEX` 中。
386388

387389
当每个索引都对应一个成功完成的 Pod 时,Job 被认为是已完成的。
@@ -719,6 +721,7 @@ The pattern names are also links to examples and more detailed description.
719721
| [Pod 数量可变的队列](/zh-cn/docs/tasks/job/fine-parallel-processing-work-queue/) | ✓ | ✓ | |
720722
| [静态任务分派的带索引的 Job](/zh-cn/docs/tasks/job/indexed-parallel-processing-static) | ✓ | | ✓ |
721723
| [Job 模板扩展](/zh-cn/docs/tasks/job/parallel-processing-expansion/) | | | ✓ |
724+
| [带 Pod 间通信的 Job](/zh-cn/docs/tasks/job/job-with-pod-to-pod-communication/) | ✓ | 有时 | 有时 |
722725

723726
<!--
724727
When you specify completions with `.spec.completions`, each Pod created by the Job controller
@@ -745,6 +748,7 @@ Here, `W` is the number of work items.
745748
| [Pod 个数可变的队列](/zh-cn/docs/tasks/job/fine-parallel-processing-work-queue/) | 1 | 任意值 |
746749
| [静态任务分派的带索引的 Job](/zh-cn/docs/tasks/job/indexed-parallel-processing-static) | W | | 任意值 |
747750
| [Job 模板扩展](/zh-cn/docs/tasks/job/parallel-processing-expansion/) | 1 | 应该为 1 |
751+
| [带 Pod 间通信的 Job](/zh-cn/docs/tasks/job/job-with-pod-to-pod-communication/) | W | W |
748752

749753
<!--
750754
## Advanced usage
@@ -943,7 +947,7 @@ The [suspend](#suspending-a-job) field is the first step towards achieving those
943947
custom queue controller to decide when a job should start; However, once a job is unsuspended,
944948
a custom queue controller has no influence on where the pods of a job will actually land.
945949
-->
946-
[suspend](#suspend-a-job) 字段是实现这些语义的第一步。
950+
[suspend](#suspending-a-job) 字段是实现这些语义的第一步。
947951
suspend 允许自定义队列控制器,以决定工作何时开始;然而,一旦工作被取消暂停,
948952
自定义队列控制器对 Job 中 Pod 的实际放置位置没有影响。
949953
@@ -1099,7 +1103,7 @@ Pod disruption conditions in the Pod failure policy (see also:
10991103
available in Kubernetes v1.25.
11001104
-->
11011105
只有你在集群中启用了
1102-
`JobPodFailurePolicy` [特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)
1106+
`JobPodFailurePolicy` [特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)
11031107
你才能为某个 Job 配置 Pod 失效策略。
11041108
此外,建议启用 `PodDisruptionConditions` 特性门控以便在 Pod 失效策略中检测和处理 Pod 干扰状况
11051109
(参考:[Pod 干扰状况](/zh-cn/docs/concepts/workloads/pods/disruptions#pod-disruption-conditions))。
@@ -1193,6 +1197,7 @@ being counted towards the `.spec.backoffLimit` limit of retries.
11931197
Pod 失效策略的第二条规则,
11941198
指定对于状况为 `DisruptionTarget` 的失效 Pod 采取 `Ignore` 操作,
11951199
统计 `.spec.backoffLimit` 重试次数限制时不考虑 Pod 因干扰而发生的异常。
1200+
11961201
{{< note >}}
11971202
<!--
11981203
If the Job failed, either by the Pod failure policy or Pod backoff
@@ -1256,10 +1261,10 @@ and the [controller manager](/docs/reference/command-line-tools-reference/kube-c
12561261
It is enabled by default.
12571262
-->
12581263
要使用该行为,你必须为 [API 服务器](/zh-cn/docs/reference/command-line-tools-reference/kube-apiserver/)
1259-
[控制器管理器](/zh-cn/docs/reference/command-line-tools-reference/kube-controller-manager/)
1260-
启用 `JobTrackingWithFinalizers`
1264+
[控制器管理器](/zh-cn/docs/reference/command-line-tools-reference/kube-controller-manager/)启用
1265+
`JobTrackingWithFinalizers`
12611266
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)
1262-
默认是启用的
1267+
该特性默认是启用的
12631268

12641269
<!--
12651270
When enabled, the control plane tracks new Jobs using the behavior described
@@ -1410,5 +1415,6 @@ object, but maintains complete control over what Pods are created and how work i
14101415
* 基于一个模板运行多个 Job:[使用展开的方式进行并行处理](/zh-cn/docs/tasks/job/parallel-processing-expansion/)
14111416
* 跟随[自动清理完成的 Job](#clean-up-finished-jobs-automatically) 文中的链接,了解你的集群如何清理完成和失败的任务。
14121417
* `Job` 是 Kubernetes REST API 的一部分。阅读 {{< api-reference page="workload-resources/job-v1" >}}
1413-
对象定义理解关于该资源的 API。
1414-
* 阅读 [`CronJob`](/zh-cn/docs/concepts/workloads/controllers/cron-jobs/),它允许你定义一系列定期运行的 Job,类似于 UNIX 工具 `cron`
1418+
对象定义理解关于该资源的 API。
1419+
* 阅读 [`CronJob`](/zh-cn/docs/concepts/workloads/controllers/cron-jobs/)
1420+
它允许你定义一系列定期运行的 Job,类似于 UNIX 工具 `cron`

0 commit comments

Comments
 (0)