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

Services

The final basic tool that Kubernetes gives us to manage our applications is the service. Services give us a convenient way of accessing our services within our cluster, something often referred to as service discovery.

In practice, a service allows us to define a label selector to refer to a group of pods and then map that to something that our application can consume, without having to be modified to query the Kubernetes API to gather this information. Typically, a service will provide a stable IP address or DNS name that can be used to access the underlying pods that it refers to in a round robin fashion.

By using a service, our applications don't need to know that they are running on Kubernetes-we just need to configure them correctly with the DNS name or IP address of a service that they depend on.

A service provides a way for other applications in the cluster to discover pods that match a particular label selector. It does this by providing a stable IP address and, optionally, a DNS name. This setup is shown in the following diagram:

主站蜘蛛池模板: 桦川县| 比如县| 黄骅市| 原平市| 含山县| 宜昌市| 当雄县| 余干县| 安仁县| 卫辉市| 西峡县| 汝阳县| 余江县| 上林县| 昭通市| 黔江区| 平乐县| 方城县| 台州市| 浦东新区| 商丘市| 延寿县| 新河县| 伊宁市| 东乌珠穆沁旗| 儋州市| 义马市| 乐东| 海口市| 板桥市| 栾川县| 勐海县| 泗洪县| 江永县| 贵南县| 龙海市| 名山县| 房山区| 射阳县| 同仁县| 永胜县|