Skip to content

Commit 8a875ac

Browse files
jiaj12贾捷
authored andcommitted
Update parallel-processing-expansion.md
1 parent 0734372 commit 8a875ac

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

content/zh/docs/tasks/job/parallel-processing-expansion.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
---
22
title: 使用展开的方式进行并行处理
3-
content_type: concept
3+
content_type: task
44
min-kubernetes-server-version: v1.8
55
weight: 20
66
---
7-
87
<!--
98
title: Parallel Processing using Expansions
10-
content_type: concept
9+
content_type: task
1110
min-kubernetes-server-version: v1.8
1211
weight: 20
1312
-->
@@ -25,6 +24,7 @@ The sample Jobs process each item simply by printing a string then pausing.
2524
See [using Jobs in real workloads](#using-jobs-in-real-workloads) to learn about how
2625
this pattern fits more realistic use cases.
2726
-->
27+
2828
本任务展示基于一个公共的模板运行多个{{< glossary_tooltip text="Jobs" term_id="job" >}}。
2929
你可以用这种方法来并行执行批处理任务。
3030

@@ -78,7 +78,7 @@ First, download the following template of a job to a file called `job-tmpl.yaml`
7878
{{< codenew file="application/job/job-tmpl.yaml" >}}
7979

8080
```shell
81-
# 使用 curl 下载 job-tmpl.yaml
81+
# 使用 curl 下载 job-tmpl.yaml
8282
curl -L -s -O https://k8s.io/examples/application/job/job-tmpl.yaml
8383
```
8484

@@ -337,6 +337,12 @@ YAML file containing Kubernetes manifests:
337337
使用 `render_template` 将参数和模板转换成一个 YAML 文件,其中包含 Kubernetes
338338
资源清单:
339339

340+
<!--
341+
```shell
342+
# This requires the alias you defined earlier
343+
cat job.yaml.jinja2 | render_template > jobs.yaml
344+
```
345+
-->
340346
```shell
341347
# 此命令需要之前定义的别名
342348
cat job.yaml.jinja2 | render_template > jobs.yaml
@@ -379,7 +385,7 @@ or an external storage service. For example, if you are rendering frames for a m
379385
use HTTP to `PUT` the rendered frame data to a URL, using a different URL for each
380386
frame.
381387
-->
382-
## 在真实负载中使用 Job
388+
## 在真实负载中使用 Job {#using-jobs-in-real-workloads}
383389

384390
在真实的负载中,每个 Job 都会执行一些重要的计算,例如渲染电影的一帧,
385391
或者处理数据库中的若干行。这时,`$ITEM` 参数将指定帧号或行范围。
@@ -471,4 +477,3 @@ to manage Job objects automatically.
471477

472478
你也可以考虑编写自己的[控制器](/zh/docs/concepts/architecture/controller/)
473479
来自动管理 Job 对象。
474-

0 commit comments

Comments
 (0)