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

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:

主站蜘蛛池模板: 凤冈县| 河东区| 云浮市| 武夷山市| 洪江市| 洪洞县| 汝城县| 沧源| 丁青县| 临安市| 德令哈市| 五台县| 安宁市| 晋中市| 衢州市| 永胜县| 苏尼特左旗| 明光市| 渝中区| 五台县| 双鸭山市| 洪江市| 勃利县| 洪泽县| 望奎县| 海晏县| 孙吴县| 张北县| 博客| 伊宁县| 资阳市| 自治县| 莱州市| 沛县| 北票市| 基隆市| 图木舒克市| 疏勒县| 南川市| 兴安盟| 江门市|