Skip to content

Commit 9c5b45d

Browse files
authored
Merge pull request #36603 from windsonsea/trcomkub
[zh]Sync translate-compose-kubernetes.md
2 parents 2316eb1 + 3cb32c7 commit 9c5b45d

File tree

1 file changed

+21
-24
lines changed

1 file changed

+21
-24
lines changed

content/zh-cn/docs/tasks/configure-pod-container/translate-compose-kubernetes.md

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ weight: 200
1616
<!--
1717
What's Kompose? It's a conversion tool for all things compose (namely Docker Compose) to container orchestrators (Kubernetes or OpenShift).
1818
-->
19-
Kompose 是什么?它是个转换工具,可将 compose(即 Docker Compose)所组装的所有内容
20-
转换成容器编排器(Kubernetes 或 OpenShift)可识别的形式。
19+
Kompose 是什么?它是一个转换工具,可将 compose
20+
(即 Docker Compose)所组装的所有内容转换成容器编排器(Kubernetes 或 OpenShift)可识别的形式。
2121

2222
<!--
2323
More information can be found on the Kompose website at [http://kompose.io](http://kompose.io).
@@ -46,8 +46,7 @@ We have multiple ways to install Kompose. Our preferred method is downloading th
4646
Kompose is released via GitHub on a three-week cycle, you can see all current releases on the [GitHub release page](https://github.com/kubernetes/kompose/releases).
4747
-->
4848
Kompose 通过 GitHub 发布,发布周期为三星期。
49-
你可以在 [GitHub 发布页面](https://github.com/kubernetes/kompose/releases)
50-
上看到所有当前版本。
49+
你可以在 [GitHub 发布页面](https://github.com/kubernetes/kompose/releases)上看到所有当前版本。
5150

5251
```shell
5352
# Linux
@@ -88,7 +87,7 @@ Kompose is in [EPEL](https://fedoraproject.org/wiki/EPEL) CentOS repository.
8887
If you don't have [EPEL](https://fedoraproject.org/wiki/EPEL) repository already installed and enabled you can do it by running `sudo yum install epel-release`
8988
-->
9089
Kompose 位于 [EPEL](https://fedoraproject.org/wiki/EPEL) CentOS 代码仓库。
91-
如果你还没有安装启用 [EPEL](https://fedoraproject.org/wiki/EPEL) 代码仓库,
90+
如果你还没有安装并启用 [EPEL](https://fedoraproject.org/wiki/EPEL) 代码仓库,
9291
请运行命令 `sudo yum install epel-release`
9392

9493
<!--
@@ -102,7 +101,7 @@ sudo yum -y install kompose
102101
```
103102

104103
{{% /tab %}}
105-
{{% tab name="Fedora package" %}}
104+
{{% tab name="Fedora " %}}
106105

107106
<!--
108107
Kompose is in Fedora 24, 25 and 26 repositories. You can install it like any other package.
@@ -137,7 +136,7 @@ brew install kompose
137136
In a few steps, we'll take you from Docker Compose to Kubernetes. All
138137
you need is an existing `docker-compose.yml` file.
139138
-->
140-
再需几步,我们就把你从 Docker Compose 带到 Kubernetes。
139+
只需几步,我们就把你从 Docker Compose 带到 Kubernetes。
141140
你只需要一个现有的 `docker-compose.yml` 文件。
142141

143142
<!--
@@ -151,7 +150,7 @@ you need is an existing `docker-compose.yml` file.
151150
services:
152151

153152
redis-master:
154-
image: k8s.gcr.io/redis:e2e
153+
image: registry.k8s.io/redis:e2e
155154
ports:
156155
- "6379"
157156

@@ -235,7 +234,7 @@ you need is an existing `docker-compose.yml` file.
235234
<!--
236235
3. Access your application.
237236
-->
238-
3. 访问你的应用
237+
3. 访问你的应用
239238

240239
<!--
241240
If you're already using `minikube` for your development process:
@@ -274,7 +273,7 @@ you need is an existing `docker-compose.yml` file.
274273
<!--
275274
If you're using a cloud provider, your IP will be listed next to `LoadBalancer Ingress`.
276275
-->
277-
如果你使用的是云提供商,你的 IP 将在 `LoadBalancer Ingress` 字段给出。
276+
如果你使用的是云驱动,你的 IP 将在 `LoadBalancer Ingress` 字段给出。
278277

279278
```shell
280279
curl http://192.0.2.89
@@ -300,7 +299,7 @@ you need is an existing `docker-compose.yml` file.
300299
- [`kompose convert`](#kompose-convert)
301300

302301
- 文档
303-
- [其他转换方式](#其他转换方式)
302+
- [其他转换方式](#alternative-conversions)
304303
- [标签](#labels)
305304
- [重启](#restart)
306305
- [Docker Compose 版本](#docker-compose-versions)
@@ -380,7 +379,7 @@ INFO Kubernetes file "redis-slave-deployment.yaml" created
380379
ls
381380
```
382381

383-
```
382+
```none
384383
mlbparks-deployment.yaml mongodb-service.yaml redis-slave-service.jsonmlbparks-service.yaml
385384
frontend-deployment.yaml mongodb-claim0-persistentvolumeclaim.yaml redis-master-service.yaml
386385
frontend-service.yaml mongodb-deployment.yaml redis-slave-deployment.yaml
@@ -401,7 +400,7 @@ When multiple docker-compose files are provided the configuration is merged. Any
401400
kompose --provider openshift --file docker-voting.yml convert
402401
```
403402

404-
```
403+
```none
405404
WARN [worker] Service cannot be created because of missing port.
406405
INFO OpenShift file "vote-service.yaml" created
407406
INFO OpenShift file "db-service.yaml" created
@@ -443,7 +442,7 @@ If you are manually pushing the Openshift artifacts using ``oc create -f``, you
443442
-->
444443
{{< note >}}
445444
如果使用 ``oc create -f`` 手动推送 OpenShift 工件,则需要确保在构建配置工件之前推送
446-
imagestream 工件,以解决 OpenShift 的这个问题: https://github.com/openshift/origin/issues/4518
445+
imagestream 工件,以解决 OpenShift 的这个问题: https://github.com/openshift/origin/issues/4518。
447446
{{< /note >}}
448447

449448
<!--
@@ -458,8 +457,8 @@ The default `kompose` transformation will generate Kubernetes [Deployments](/doc
458457
[Service](/zh-cn/docs/concepts/services-networking/service/) 对象。
459458
你可以选择通过 `-j` 参数生成 json 格式的对象。
460459
你也可以替换生成 [Replication Controllers](/zh-cn/docs/concepts/workloads/controllers/replicationcontroller/) 对象、
461-
[Daemon Sets](/zh-cn/docs/concepts/workloads/controllers/daemonset/)
462-
[Helm](https://github.com/helm/helm) charts
460+
[DaemonSet](/zh-cn/docs/concepts/workloads/controllers/daemonset/) 或
461+
[Helm](https://github.com/helm/helm) Chart
463462

464463
```shell
465464
kompose convert -j
@@ -531,7 +530,7 @@ chart created in "./docker-compose/"
531530
tree docker-compose/
532531
```
533532

534-
```
533+
```none
535534
docker-compose
536535
├── Chart.yaml
537536
├── README.md
@@ -557,8 +556,8 @@ For example:
557556
-->
558557
## 标签 {#labels}
559558

560-
`kompose` 支持 `docker-compose.yml` 文件中用于 Kompose 的标签,以便
561-
在转换时明确定义 Service 的行为。
559+
`kompose` 支持 `docker-compose.yml` 文件中用于 Kompose 的标签,
560+
以便在转换时明确定义 Service 的行为。
562561

563562
- `kompose.service.type` 定义要创建的 Service 类型。例如:
564563

@@ -587,8 +586,7 @@ For example:
587586
对于任何其他值,该值将被设置为主机名。
588587
如果在 Service 中定义了多个端口,则选择第一个端口作为公开端口。
589588

590-
- 如果使用 Kubernetes 驱动,会有一个 Ingress 资源被创建,并且假定
591-
已经配置了相应的 Ingress 控制器。
589+
- 如果使用 Kubernetes 驱动,会有一个 Ingress 资源被创建,并且假定已经配置了相应的 Ingress 控制器。
592590
- 如果使用 OpenShift 驱动,则会有一个 route 被创建。
593591

594592
例如:
@@ -657,7 +655,6 @@ If you want to create normal pods without controllers you can use `restart` cons
657655
| `on-failure` | Pod | `OnFailure` |
658656
| `no` | Pod | `Never` |
659657

660-
661658
<!--
662659
The controller object could be `deployment` or `replicationcontroller`, etc.
663660
-->
@@ -713,6 +710,6 @@ A full list on compatibility between all three versions is listed in our [conver
713710
Kompose 支持的 Docker Compose 版本包括:1、2 和 3。
714711
对 2.1 和 3.2 版本的支持还有限,因为它们还在实验阶段。
715712

716-
所有三个版本的兼容性列表请查看我们的
717-
[转换文档](https://github.com/kubernetes/kompose/blob/master/docs/conversion.md),
713+
所有三个版本的兼容性列表,
714+
请查看我们的[转换文档](https://github.com/kubernetes/kompose/blob/master/docs/conversion.md),
718715
文档中列出了所有不兼容的 Docker Compose 关键字。

0 commit comments

Comments
 (0)