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

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.

主站蜘蛛池模板: 郑州市| 广州市| 怀远县| 池州市| 仁布县| 富锦市| 合作市| 基隆市| 睢宁县| 车致| 正宁县| 白玉县| 祁门县| 鹿邑县| 惠东县| 湖口县| 江安县| 商都县| 广汉市| 奉贤区| 大埔区| 南乐县| 林周县| 延吉市| 明星| 安达市| 孟村| 裕民县| 金门县| 探索| 赫章县| 任丘市| 本溪| 浮梁县| 潮州市| 乡城县| 荥阳市| 会泽县| 武义县| 普宁市| 昌邑市|