官术网_书友最值得收藏!

External services

In the previous chapter, we saw a few service examples. For testing and demonstration purposes, we wanted all the services to be externally accessible. This was configured by the type: LoadBalancer element in our service definition. The LoadBalancer type creates an external load balancer on the cloud provider. We should note that support for external load balancers varies by provider, as does the implementation. In our case, we are using GCE, so integration is pretty smooth. The only additional setup needed is to open firewall rules for the external service ports.

Let's dig a little deeper and do a describe command on one of the services from the More on labels section in Chapter 2, Pods, Services, Replication Controllers, and Labels:

$ kubectl describe service/node-js-labels

The following screenshot is the result of the preceding command:

Service description

In the output of the preceding screenshot, you'll note several key elements. Our Namespace: is set to default, the Type: is LoadBalancer, and we have the external IP listed under LoadBalancer Ingress:. Furthermore, we can see Endpoints:, which shows us the IPs of the pods that are available to answer service requests.

主站蜘蛛池模板: 湘西| 容城县| 苍山县| 沛县| 同德县| 哈尔滨市| 壤塘县| 玉龙| 玉屏| 尼勒克县| 青河县| 肥城市| 胶州市| 诸城市| 洪洞县| 兴国县| 望江县| 阜新| 荔浦县| 江川县| 祁门县| 杂多县| 南漳县| 宜宾市| 灵川县| 平遥县| 盐城市| 大邑县| 两当县| 瑞昌市| 关岭| 连山| 洛隆县| 本溪市| 濮阳市| 南郑县| 台东市| 喀什市| 册亨县| 信宜市| 上饶市|