@@ -188,28 +188,16 @@ you need is an existing `docker-compose.yml` file.
188188 输出类似于:
189189
190190 ` ` ` 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
208196 INFO Kubernetes file "redis-slave-deployment.yaml" created
209197 ` ` `
210198
211199 ` ` ` 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
213201 ` ` `
214202
215203 <!--
@@ -218,7 +206,7 @@ you need is an existing `docker-compose.yml` file.
218206 输出类似于:
219207
220208 ` ` ` none
221- service/frontend created
209+ service/frontend-tcp created
222210 service/redis-master created
223211 service/redis-slave created
224212 deployment.apps/frontend created
@@ -256,18 +244,29 @@ you need is an existing `docker-compose.yml` file.
256244 ` ` `
257245
258246 ` ` ` 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
271270 ` ` `
272271
273272 <!--
@@ -279,6 +278,21 @@ you need is an existing `docker-compose.yml` file.
279278 curl http://192.0.2.89
280279 ` ` `
281280
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+
282296<!-- discussion -->
283297
284298<!--
@@ -437,10 +451,10 @@ INFO OpenShift file "foo-imagestream.yaml" created
437451INFO OpenShift file "foo-buildconfig.yaml" created
438452` ` `
439453
454+ {{< note >}}
440455<!--
441456If 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 .
442457-->
443- {{< note >}}
444458如果使用 ``oc create -f`` 手动推送 OpenShift 工件,则需要确保在构建配置工件之前推送
445459imagestream 工件,以解决 OpenShift 的这个问题: https://github.com/openshift/origin/issues/4518。
446460{{< /note >}}
@@ -659,10 +673,10 @@ If you want to create normal pods without controllers you can use `restart` cons
659673| `on-failure` | Pod | `OnFailure` |
660674| `no` | Pod | `Never` |
661675
676+ {{< note >}}
662677<!--
663678The controller object could be `deployment` or `replicationcontroller`.
664679-->
665- {{< note >}}
666680控制器对象可以是 `deployment` 或 `replicationcontroller`。
667681{{< /note >}}
668682
0 commit comments