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

  • DevOps with Kubernetes
  • Hideto Saito Hui Chuan Chloe Lee Cheng Yang Wu
  • 172字
  • 2021-07-02 13:41:55

Services

Services in Kubernetes are abstraction layers for routing traffic to a logical set of pods. With Services, we don't need to trace the IP address of each pod. Services usually use the label selector to select the pods that they need to route to while, in some cases, Services are created without a selector on purpose. The Service abstraction is powerful. It enables decoupling and makes communication between micro-services possible. Currently, Kubernetes Services support TCP, UDP, and SCTP.

Services don't care about how we create the pod. Just like ReplicaSet, it only cares that the pods match its label selectors, so the pods could belong to different ReplicaSets:

Service maps pods via label selector

In the preceding diagram, all of the pods match the service selector, project=chapter3, service=web, so the Service will be responsible for distributing the traffic into all of the pods without explicit assignment.

There are four types of Services: ClusterIP, NodePort, LoadBalancer, and ExternalName:

LoadBalancer includes the features of NodePort and ClusterIP
主站蜘蛛池模板: 平乡县| 简阳市| 伽师县| 汤原县| 泗阳县| 太仆寺旗| 广饶县| 宜阳县| 开封市| 津市市| 吉林省| 自贡市| 叙永县| 澜沧| 元阳县| 沈丘县| 滦南县| 旬邑县| 保亭| 四会市| 肃宁县| 龙泉市| 丰顺县| 潞西市| 原平市| 宁阳县| 富裕县| 武鸣县| 昌吉市| 昌平区| 吕梁市| 克什克腾旗| 黑龙江省| 凤台县| 高平市| 阜宁县| 永新县| 宿州市| 铁力市| 文安县| 赤水市|