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

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:

主站蜘蛛池模板: 永宁县| 蒙城县| 峡江县| 图片| 静安区| 永善县| 遵义县| 墨脱县| 翁源县| 沁阳市| 绩溪县| 巴林右旗| 上栗县| 如皋市| 乌恰县| 社旗县| 灵丘县| 岑溪市| 曲周县| 英吉沙县| 秦安县| 太湖县| 洛浦县| 三明市| 项城市| 文山县| 长岛县| 宝鸡市| 柏乡县| 鹿邑县| 封丘县| 化州市| 揭阳市| 岑巩县| 天水市| 崇左市| 蓬溪县| 田林县| 全州县| 胶州市| 铜鼓县|