0

I understand that nodes in K8s cluster will all have kube-proxy running and any node can forward traffic for any service in the cluster.

Lets say I have a service with two replica pods which are running on two Nodes N1 and N2. The external load balancer forwards traffic to N3 and N4. The first request reaches N3 and N3's kube-proxy diverts the traffic to N1. The second request reaches N4 and N4's kube-proxy diverts the traffic to N2.

Do kube-proxys communicate with each other so that N4's kube-proxy is aware that earlier request was forwarded to N1 and so it should divert this request to N2 for proper load balancing or the decision is local to that kube-proxy and not coordinated across kube-proxy in which case it doesn't correctly load balance ?

4

2 回答 2

0

每个 kube-proxy 实例分别进行负载均衡。

于 2016-01-02T07:33:41.783 回答
0

Kube-Proxy不相互通信,它们只进行对话apiserver以获取服务及其端点信息。

负载平衡在每个kube-proxy. 由于默认的 LB 算法是随机的,所以没有必要让事情变得复杂。

于 2017-04-07T03:37:07.290 回答