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

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.

主站蜘蛛池模板: 通辽市| 河西区| 镇赉县| 宝山区| 邢台县| 莱芜市| 高邑县| 济南市| 临夏县| 周口市| 会泽县| 榆树市| 商河县| 师宗县| 高雄市| 金门县| 工布江达县| 旌德县| 贞丰县| 沙河市| 阳城县| 色达县| 疏勒县| 台南市| 施甸县| 金沙县| 资兴市| 巫溪县| 成武县| 鄄城县| 泽州县| 波密县| 安溪县| 文安县| 化隆| 永善县| 和田市| 射阳县| 昭苏县| 黔西县| 湖南省|