add zh pages

This commit is contained in:
Karen Bradshaw
2020-06-01 09:23:39 -04:00
parent 21fd0a12f9
commit 4b35d4d401
303 changed files with 2764 additions and 2439 deletions
@@ -3,7 +3,7 @@ reviewers:
- chenopis
title: 使用 CronJob 运行自动化任务
content_template: templates/task
content_type: task
weight: 10
---
@@ -12,12 +12,12 @@ weight: 10
title: Running Automated Tasks with a CronJob
reviewers:
- chenopis
content_template: templates/task
content_type: task
weight: 10
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
You can use [CronJobs](/docs/concepts/workloads/controllers/cron-jobs) to run jobs on a time-based schedule.
@@ -53,9 +53,10 @@ CronJobs 有一些限制和特点。
因此,任务应该是幂等的。
查看更多限制,请参考 [CronJobs](/docs/concepts/workloads/controllers/cron-jobs)。
{{% /capture %}}
{{% capture prerequisites %}}
## {{% heading "prerequisites" %}}
* {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
<!--
@@ -69,9 +70,9 @@ component.
* 你需要一个版本 >=1.8 且工作正常的 Kubernetes 集群。对于更早的版本( <1.8 ),你需要对 API 服务器设置 `--runtime-config=batch/v2alpha1=true` 来开启 `batch/v2alpha1` API(更多信息请查看 [为你的集群开启或关闭 API 版本](/docs/admin/cluster-management/#turn-on-or-off-an-api-version-for-your-cluster)
), 然后重启 API 服务器和控制管理器。
{{% /capture %}}
{{% capture steps %}}
<!-- steps -->
<!--
## Creating a Cron Job
@@ -359,4 +360,4 @@ By default, they are set to 3 and 1 respectively. Setting a limit to `0` corres
这两个域声明了有多少执行完成和失败的任务会被保留。
默认设置为3和1。限制设置为0代表相应类型的任务完成后不会保留。
{{% /capture %}}
@@ -1,18 +1,18 @@
---
title: 使用工作队列进行粗粒度并行处理
content_template: templates/task
content_type: task
weight: 30
---
<!--
---
title: Coarse Parallel Processing Using a Work Queue
content_template: templates/task
content_type: task
weight: 30
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
In this example, we will run a Kubernetes Job with multiple parallel
@@ -43,10 +43,11 @@ Here is an overview of the steps in this example:
1. **启动一个在队列中执行这些任务的 Job**。该 Job 启动多个 Pod。每个 Pod 从消息队列中取走一个任务,处理它,然后重复执行,直到队列的队尾。
{{% /capture %}}
{{% capture prerequisites %}}
## {{% heading "prerequisites" %}}
<!--
Be familiar with the basic,
@@ -57,9 +58,9 @@ non-parallel, use of [Job](/docs/concepts/jobs/run-to-completion-finite-workload
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
{{% /capture %}}
{{% capture steps %}}
<!-- steps -->
<!--
## Starting a message queue service
@@ -436,9 +437,9 @@ All our pods succeeded. Yay.
我们所有的 Pod 都成功了。耶!
{{% /capture %}}
{{% capture discussion %}}
<!-- discussion -->
<!--
## Alternatives
@@ -501,4 +502,4 @@ in the queue have been processed.
* 在 amqp-consume 命令拿到消息和容器成功退出之间的时间段内,执行杀死容器操作;
* 在 kubelet 向 api-server 传回 Pod 成功运行之前,发生节点崩溃。
{{% /capture %}}
@@ -2,18 +2,18 @@
cn-approvers:
- linyouchong
title: 使用工作队列进行精细的并行处理
content_template: templates/task
content_type: task
weight: 40
---
<!--
---
title: Fine Parallel Processing Using a Work Queue
content_template: templates/task
content_type: task
weight: 40
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
In this example, we will run a Kubernetes Job with multiple parallel
@@ -57,17 +57,18 @@ Here is an overview of the steps in this example:
3. **启动一个 Job 对队列中的任务进行处理**。这个 Job 启动了若干个 Pod 。每个 Pod 从消息队列中取出一个工作任务,处理它,然后重复,直到到达队列的尾部。
{{% /capture %}}
{{< toc >}}
{{% capture prerequisites %}}
## {{% heading "prerequisites" %}}
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
{{% /capture %}}
{{% capture steps %}}
<!-- steps -->
<!--
Be familiar with the basic,
@@ -75,9 +76,9 @@ non-parallel, use of [Job](/docs/concepts/jobs/run-to-completion-finite-workload
-->
熟秋基础知识,非并行方式运行 [Job](/docs/concepts/jobs/run-to-completion-finite-workloads/)。
{{% /capture %}}
{{% capture steps %}}
<!-- steps -->
<!--
## Starting Redis
@@ -359,9 +360,9 @@ As you can see, one of our pods worked on several work units.
-->
您可以看到,其中的一个 pod 处理了若干个工作单元。
{{% /capture %}}
{{% capture discussion %}}
<!-- discussion -->
<!--
## Alternatives
@@ -382,4 +383,4 @@ and consider running a background processing library such as
-->
如果您有连续的后台处理业务,那么可以考虑使用 `replicationController` 来运行您的后台业务,和运行一个类似 [https://github.com/resque/resque](https://github.com/resque/resque) 的后台处理库。
{{% /capture %}}
@@ -1,6 +1,6 @@
---
title: 使用扩展进行并行处理
content_template: templates/concept
content_type: concept
min-kubernetes-server-version: v1.8
weight: 20
---
@@ -8,13 +8,13 @@ weight: 20
<!--
---
title: Parallel Processing using Expansions
content_template: templates/concept
content_type: concept
min-kubernetes-server-version: v1.8
weight: 20
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
In this example, we will run multiple Kubernetes Jobs created from
@@ -23,10 +23,10 @@ non-parallel, use of [Jobs](/docs/concepts/workloads/controllers/jobs-run-to-com
-->
在这个示例中,我们将运行从一个公共模板创建的多个 Kubernetes Job。您可能需要先熟悉 [Jobs](/docs/concepts/workloads/controllers/jobs-run-to-completion/) 的基本概念、非并行以及如何使用它。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Basic Template Expansion
@@ -338,4 +338,4 @@ other [job patterns](/docs/concepts/jobs/run-to-completion-finite-workloads/#job
-->
在这种情况下,您可以考虑其他的[作业模式](/docs/concepts/jobs/run-to-completion-finite-workloads/#job-patterns)。
{{% /capture %}}