Kubernetes Service cluster IP, how is this internally load balanced across different nodes

前端 未结 1 684
南旧
南旧 2020-12-15 04:05

I create a deployment which results in 4 pods existing across 2 nodes.

I then expose these pods via a service which results in the following cluster IP and pod endpo

相关标签:
1条回答
  • 2020-12-15 04:40

    Everything you need is explained in second paragraph "Virtual IPs and service proxies" of this documentation: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service

    In nutshell: currently, depending on the proxy mode, for ClusterIP it's just round robin/random. It's done by kube-proxy, which runs on each nodes, proxies UDP and TCP and provides load balancing.

    It's better to think of kubernetes as a whole rather than specific nodes. Abstraction does its thing here.

    Hope it answers your question.

    0 讨论(0)
提交回复
热议问题