澄清入口负载平衡器 [英] Clarify Ingress load balancer
问题描述
我不确定Ingress的负载平衡方式.
如果我理解正确,实际发生的事情是这样的:
I'm not sure how load balancing works with Ingress.
If I understand correctly, what happens is actually something like this:
我看不到如何执行负载平衡.
我提出的上述方案有什么问题?
你能帮我纠正一下吗?
I fail to see how the load balancing is performed.
What is wrong in the above scheme that I have drawn?
Can you help me rectify it?
注意:
-以下答案告诉我Ingress控制器本身的类型为"loadbalancer": Ingress服务类型
-我使用的是ClusterIP,因为我不想将负载均衡器暴露给外界.以下文章不支持此要求,该负载平衡器将由服务提供:
Notes:
- The following answer tells me that the Ingress controller itself is of type 'loadbalancer': Ingress service type
- I use kind ClusterIP because I don't want to expose the loadbalancer to the outside world. The following article does not support this claim, where the load balancer would be provided by the service:
推荐答案
ClusterIP
服务本身执行负载平衡.命名可能会造成混淆,因为LoadBalancer
服务不是唯一涉及负载平衡的服务-LoadBalancer
实际上意味着更多类似云提供商请创建一个外部负载平衡器并将其指向此服务". kubernetes ClusterIP
服务还使用kube-proxy 在不同节点中的各个Pod上实现负载均衡.如果您不希望kubernetes进行负载平衡,则必须通过创建无头服务.
The ClusterIP
services themselves perform load balancing. The naming can be confusing as LoadBalancer
services are not the only services that involve load balancing - LoadBalancer
actually means something more like 'cloud provider please create an external load balancer and point it at this service'. The kubernetes ClusterIP
services also load-balance across Pods in different Nodes using the kube-proxy. If you don't want kubernetes to do load balancing then you have to specifically disable it by creating a headless service.
这篇关于澄清入口负载平衡器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!