@@ -16,8 +16,8 @@ weight: 200
16
16
<!--
17
17
What's Kompose? It's a conversion tool for all things compose (namely Docker Compose) to container orchestrators (Kubernetes or OpenShift).
18
18
-->
19
- Kompose 是什么?它是个转换工具 ,可将 compose(即 Docker Compose)所组装的所有内容
20
- 转换成容器编排器 (Kubernetes 或 OpenShift)可识别的形式。
19
+ Kompose 是什么?它是一个转换工具 ,可将 compose
20
+ (即 Docker Compose)所组装的所有内容转换成容器编排器 (Kubernetes 或 OpenShift)可识别的形式。
21
21
22
22
<!--
23
23
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
46
46
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).
47
47
-->
48
48
Kompose 通过 GitHub 发布,发布周期为三星期。
49
- 你可以在 [ GitHub 发布页面] ( https://github.com/kubernetes/kompose/releases )
50
- 上看到所有当前版本。
49
+ 你可以在 [ GitHub 发布页面] ( https://github.com/kubernetes/kompose/releases ) 上看到所有当前版本。
51
50
52
51
``` shell
53
52
# Linux
@@ -88,7 +87,7 @@ Kompose is in [EPEL](https://fedoraproject.org/wiki/EPEL) CentOS repository.
88
87
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`
89
88
-->
90
89
Kompose 位于 [ EPEL] ( https://fedoraproject.org/wiki/EPEL ) CentOS 代码仓库。
91
- 如果你还没有安装启用 [ EPEL] ( https://fedoraproject.org/wiki/EPEL ) 代码仓库,
90
+ 如果你还没有安装并启用 [ EPEL] ( https://fedoraproject.org/wiki/EPEL ) 代码仓库,
92
91
请运行命令 ` sudo yum install epel-release ` 。
93
92
94
93
<!--
@@ -102,7 +101,7 @@ sudo yum -y install kompose
102
101
```
103
102
104
103
{{% /tab %}}
105
- {{% tab name="Fedora package " %}}
104
+ {{% tab name="Fedora 包 " %}}
106
105
107
106
<!--
108
107
Kompose is in Fedora 24, 25 and 26 repositories. You can install it like any other package.
@@ -137,7 +136,7 @@ brew install kompose
137
136
In a few steps, we'll take you from Docker Compose to Kubernetes. All
138
137
you need is an existing `docker-compose.yml` file.
139
138
-->
140
- 再需几步 ,我们就把你从 Docker Compose 带到 Kubernetes。
139
+ 只需几步 ,我们就把你从 Docker Compose 带到 Kubernetes。
141
140
你只需要一个现有的 ` docker-compose.yml ` 文件。
142
141
143
142
<!--
@@ -151,7 +150,7 @@ you need is an existing `docker-compose.yml` file.
151
150
services :
152
151
153
152
redis-master :
154
- image : k8s.gcr .io/redis:e2e
153
+ image : registry.k8s .io/redis:e2e
155
154
ports :
156
155
- " 6379"
157
156
@@ -235,7 +234,7 @@ you need is an existing `docker-compose.yml` file.
235
234
<!--
236
235
3. Access your application.
237
236
-->
238
- 3. 访问你的应用
237
+ 3. 访问你的应用。
239
238
240
239
<!--
241
240
If you're already using `minikube` for your development process :
@@ -274,7 +273,7 @@ you need is an existing `docker-compose.yml` file.
274
273
<!--
275
274
If you're using a cloud provider, your IP will be listed next to `LoadBalancer Ingress`.
276
275
-->
277
- 如果你使用的是云提供商 ,你的 IP 将在 `LoadBalancer Ingress` 字段给出。
276
+ 如果你使用的是云驱动 ,你的 IP 将在 `LoadBalancer Ingress` 字段给出。
278
277
279
278
` ` ` shell
280
279
curl http://192.0.2.89
@@ -300,7 +299,7 @@ you need is an existing `docker-compose.yml` file.
300
299
- [`kompose convert`](#kompose-convert)
301
300
302
301
- 文档
303
- - [其他转换方式](#其他转换方式 )
302
+ - [其他转换方式](#alternative-conversions )
304
303
- [标签](#labels)
305
304
- [重启](#restart)
306
305
- [Docker Compose 版本](#docker-compose-versions)
@@ -380,7 +379,7 @@ INFO Kubernetes file "redis-slave-deployment.yaml" created
380
379
ls
381
380
` ` `
382
381
383
- ```
382
+ ` ` ` none
384
383
mlbparks-deployment.yaml mongodb-service.yaml redis-slave-service.jsonmlbparks-service.yaml
385
384
frontend-deployment.yaml mongodb-claim0-persistentvolumeclaim.yaml redis-master-service.yaml
386
385
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
401
400
kompose --provider openshift --file docker-voting.yml convert
402
401
` ` `
403
402
404
- ```
403
+ ` ` ` none
405
404
WARN [worker] Service cannot be created because of missing port.
406
405
INFO OpenShift file "vote-service.yaml" created
407
406
INFO OpenShift file "db-service.yaml" created
@@ -443,7 +442,7 @@ If you are manually pushing the Openshift artifacts using ``oc create -f``, you
443
442
-->
444
443
{{< note >}}
445
444
如果使用 ``oc create -f`` 手动推送 OpenShift 工件,则需要确保在构建配置工件之前推送
446
- imagestream 工件,以解决 OpenShift 的这个问题: https://github.com/openshift/origin/issues/4518 。
445
+ imagestream 工件,以解决 OpenShift 的这个问题: https://github.com/openshift/origin/issues/4518。
447
446
{{< /note >}}
448
447
449
448
<!--
@@ -458,8 +457,8 @@ The default `kompose` transformation will generate Kubernetes [Deployments](/doc
458
457
[Service](/zh-cn/docs/concepts/services-networking/service/) 对象。
459
458
你可以选择通过 `-j` 参数生成 json 格式的对象。
460
459
你也可以替换生成 [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 。
463
462
464
463
` ` ` shell
465
464
kompose convert -j
@@ -531,7 +530,7 @@ chart created in "./docker-compose/"
531
530
tree docker-compose/
532
531
` ` `
533
532
534
- ```
533
+ ` ` ` none
535
534
docker-compose
536
535
├── Chart.yaml
537
536
├── README.md
@@ -557,8 +556,8 @@ For example:
557
556
-->
558
557
# # 标签 {#labels}
559
558
560
- ` kompose ` 支持 ` docker-compose.yml ` 文件中用于 Kompose 的标签,以便
561
- 在转换时明确定义 Service 的行为。
559
+ ` kompose` 支持 `docker-compose.yml` 文件中用于 Kompose 的标签,
560
+ 以便在转换时明确定义 Service 的行为。
562
561
563
562
- ` kompose.service.type` 定义要创建的 Service 类型。例如:
564
563
@@ -587,8 +586,7 @@ For example:
587
586
对于任何其他值,该值将被设置为主机名。
588
587
如果在 Service 中定义了多个端口,则选择第一个端口作为公开端口。
589
588
590
- - 如果使用 Kubernetes 驱动,会有一个 Ingress 资源被创建,并且假定
591
- 已经配置了相应的 Ingress 控制器。
589
+ - 如果使用 Kubernetes 驱动,会有一个 Ingress 资源被创建,并且假定已经配置了相应的 Ingress 控制器。
592
590
- 如果使用 OpenShift 驱动,则会有一个 route 被创建。
593
591
594
592
例如:
@@ -657,7 +655,6 @@ If you want to create normal pods without controllers you can use `restart` cons
657
655
| `on-failure` | Pod | `OnFailure` |
658
656
| `no` | Pod | `Never` |
659
657
660
-
661
658
<!--
662
659
The controller object could be `deployment` or `replicationcontroller`, etc.
663
660
-->
@@ -713,6 +710,6 @@ A full list on compatibility between all three versions is listed in our [conver
713
710
Kompose 支持的 Docker Compose 版本包括:1、2 和 3。
714
711
对 2.1 和 3.2 版本的支持还有限,因为它们还在实验阶段。
715
712
716
- 所有三个版本的兼容性列表请查看我们的
717
- [转换文档](https://github.com/kubernetes/kompose/blob/master/docs/conversion.md),
713
+ 所有三个版本的兼容性列表,
714
+ 请查看我们的 [转换文档](https://github.com/kubernetes/kompose/blob/master/docs/conversion.md),
718
715
文档中列出了所有不兼容的 Docker Compose 关键字。
0 commit comments