@@ -188,28 +188,16 @@ you need is an existing `docker-compose.yml` file.
188
188
输出类似于:
189
189
190
190
` ` ` none
191
- INFO Kubernetes file "frontend-service.yaml" created
192
- INFO Kubernetes file "frontend-service.yaml" created
193
- INFO Kubernetes file "frontend-service.yaml" created
194
- INFO Kubernetes file "redis-master-service.yaml" created
195
- INFO Kubernetes file "redis-master-service.yaml" created
196
- INFO Kubernetes file "redis-master-service.yaml" created
197
- INFO Kubernetes file "redis-slave-service.yaml" created
198
- INFO Kubernetes file "redis-slave-service.yaml" created
199
- INFO Kubernetes file "redis-slave-service.yaml" created
200
- INFO Kubernetes file "frontend-deployment.yaml" created
201
- INFO Kubernetes file "frontend-deployment.yaml" created
202
- INFO Kubernetes file "frontend-deployment.yaml" created
203
- INFO Kubernetes file "redis-master-deployment.yaml" created
204
- INFO Kubernetes file "redis-master-deployment.yaml" created
205
- INFO Kubernetes file "redis-master-deployment.yaml" created
206
- INFO Kubernetes file "redis-slave-deployment.yaml" created
207
- INFO Kubernetes file "redis-slave-deployment.yaml" created
191
+ INFO Kubernetes file "frontend-tcp-service.yaml" created
192
+ INFO Kubernetes file "redis-master-service.yaml" created
193
+ INFO Kubernetes file "redis-slave-service.yaml" created
194
+ INFO Kubernetes file "frontend-deployment.yaml" created
195
+ INFO Kubernetes file "redis-master-deployment.yaml" created
208
196
INFO Kubernetes file "redis-slave-deployment.yaml" created
209
197
` ` `
210
198
211
199
` ` ` bash
212
- kubectl apply -f frontend-service.yaml,redis-master-service.yaml,redis-slave-service.yaml,frontend-deployment.yaml,redis-master-deployment.yaml,redis-slave-deployment.yaml
200
+ kubectl apply -f frontend-tcp- service.yaml,redis-master-service.yaml,redis-slave-service.yaml,frontend-deployment.yaml,redis-master-deployment.yaml,redis-slave-deployment.yaml
213
201
` ` `
214
202
215
203
<!--
@@ -218,7 +206,7 @@ you need is an existing `docker-compose.yml` file.
218
206
输出类似于:
219
207
220
208
` ` ` none
221
- service/frontend created
209
+ service/frontend-tcp created
222
210
service/redis-master created
223
211
service/redis-slave created
224
212
deployment.apps/frontend created
@@ -256,18 +244,29 @@ you need is an existing `docker-compose.yml` file.
256
244
` ` `
257
245
258
246
` ` ` none
259
- Name: frontend
260
- Namespace: default
261
- Labels: service=frontend
262
- Selector: service=frontend
263
- Type: LoadBalancer
264
- IP: 10.0.0.183
265
- LoadBalancer Ingress: 192.0.2.89
266
- Port: 80 80/TCP
267
- NodePort: 80 31144/TCP
268
- Endpoints: 172.17.0.4:80
269
- Session Affinity: None
270
- No events.
247
+ Name: frontend-tcp
248
+ Namespace: default
249
+ Labels: io.kompose.service=frontend-tcp
250
+ Annotations: kompose.cmd: kompose convert
251
+ kompose.service.type: LoadBalancer
252
+ kompose.version: 1.26.0 (40646f47)
253
+ Selector: io.kompose.service=frontend
254
+ Type: LoadBalancer
255
+ IP Family Policy: SingleStack
256
+ IP Families: IPv4
257
+ IP: 10.43.67.174
258
+ IPs: 10.43.67.174
259
+ Port: 80 80/TCP
260
+ TargetPort: 80/TCP
261
+ NodePort: 80 31254/TCP
262
+ Endpoints: 10.42.0.25:80
263
+ Session Affinity: None
264
+ External Traffic Policy: Cluster
265
+ Events:
266
+ Type Reason Age From Message
267
+ ---- ------ ---- ---- -------
268
+ Normal EnsuringLoadBalancer 62s service-controller Ensuring load balancer
269
+ Normal AppliedDaemonSet 62s service-controller Applied LoadBalancer DaemonSet kube-system/svclb-frontend-tcp-9362d276
271
270
` ` `
272
271
273
272
<!--
@@ -279,6 +278,21 @@ you need is an existing `docker-compose.yml` file.
279
278
curl http://192.0.2.89
280
279
` ` `
281
280
281
+ <!--
282
+ 4. Clean-up.
283
+ -->
284
+ 4. 清理。
285
+
286
+ <!--
287
+ After you are finished testing out the example application deployment, simply run the following command in your shell to delete the
288
+ resources used.
289
+ -->
290
+ 你完成示例应用 Deployment 的测试之后,只需在 Shell 中运行以下命令,就能删除用过的资源。
291
+
292
+ ` ` ` sh
293
+ kubectl delete -f frontend-tcp-service.yaml,redis-master-service.yaml,redis-slave-service.yaml,frontend-deployment.yaml,redis-master-deployment.yaml,redis-slave-deployment.yaml
294
+ ` ` `
295
+
282
296
<!-- discussion -->
283
297
284
298
<!--
@@ -437,10 +451,10 @@ INFO OpenShift file "foo-imagestream.yaml" created
437
451
INFO OpenShift file "foo-buildconfig.yaml" created
438
452
` ` `
439
453
454
+ {{< note >}}
440
455
<!--
441
456
If you are manually pushing the Openshift artifacts using ``oc create -f``, you need to ensure that you push the imagestream artifact before the buildconfig artifact, to workaround this OpenShift issue : https://github.com/openshift/origin/issues/4518 .
442
457
-->
443
- {{< note >}}
444
458
如果使用 ``oc create -f`` 手动推送 OpenShift 工件,则需要确保在构建配置工件之前推送
445
459
imagestream 工件,以解决 OpenShift 的这个问题: https://github.com/openshift/origin/issues/4518。
446
460
{{< /note >}}
@@ -659,10 +673,10 @@ If you want to create normal pods without controllers you can use `restart` cons
659
673
| `on-failure` | Pod | `OnFailure` |
660
674
| `no` | Pod | `Never` |
661
675
676
+ {{< note >}}
662
677
<!--
663
678
The controller object could be `deployment` or `replicationcontroller`.
664
679
-->
665
- {{< note >}}
666
680
控制器对象可以是 `deployment` 或 `replicationcontroller`。
667
681
{{< /note >}}
668
682
0 commit comments