1
1
---
2
2
title : 使用展开的方式进行并行处理
3
- content_type : concept
3
+ content_type : task
4
4
min-kubernetes-server-version : v1.8
5
5
weight : 20
6
6
---
7
-
8
7
<!--
9
8
title: Parallel Processing using Expansions
10
- content_type: concept
9
+ content_type: task
11
10
min-kubernetes-server-version: v1.8
12
11
weight: 20
13
12
-->
@@ -25,6 +24,7 @@ The sample Jobs process each item simply by printing a string then pausing.
25
24
See [using Jobs in real workloads](#using-jobs-in-real-workloads) to learn about how
26
25
this pattern fits more realistic use cases.
27
26
-->
27
+
28
28
本任务展示基于一个公共的模板运行多个{{< glossary_tooltip text="Jobs" term_id="job" >}}。
29
29
你可以用这种方法来并行执行批处理任务。
30
30
@@ -78,7 +78,7 @@ First, download the following template of a job to a file called `job-tmpl.yaml`
78
78
{{< codenew file="application/job/job-tmpl.yaml" >}}
79
79
80
80
``` shell
81
- # 使用 curl 下载 job-tmpl.yaml
81
+ # 使用 curl 下载 job-tmpl.yaml
82
82
curl -L -s -O https://k8s.io/examples/application/job/job-tmpl.yaml
83
83
```
84
84
@@ -337,6 +337,12 @@ YAML file containing Kubernetes manifests:
337
337
使用 ` render_template ` 将参数和模板转换成一个 YAML 文件,其中包含 Kubernetes
338
338
资源清单:
339
339
340
+ <!--
341
+ ```shell
342
+ # This requires the alias you defined earlier
343
+ cat job.yaml.jinja2 | render_template > jobs.yaml
344
+ ```
345
+ -->
340
346
``` shell
341
347
# 此命令需要之前定义的别名
342
348
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
379
385
use HTTP to `PUT` the rendered frame data to a URL, using a different URL for each
380
386
frame.
381
387
-->
382
- ## 在真实负载中使用 Job
388
+ ## 在真实负载中使用 Job {#using-jobs-in-real-workloads}
383
389
384
390
在真实的负载中,每个 Job 都会执行一些重要的计算,例如渲染电影的一帧,
385
391
或者处理数据库中的若干行。这时,` $ITEM ` 参数将指定帧号或行范围。
@@ -471,4 +477,3 @@ to manage Job objects automatically.
471
477
472
478
你也可以考虑编写自己的[ 控制器] ( /zh/docs/concepts/architecture/controller/ )
473
479
来自动管理 Job 对象。
474
-
0 commit comments