澄清 Ingress 负载均衡器 [英] Clarify Ingress load balancer

查看:45
本文介绍了澄清 Ingress 负载均衡器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定负载平衡如何与 Ingress 配合使用.
如果我理解正确,实际发生的事情是这样的:

我看不到负载平衡是如何执行的.
我绘制的上述方案有什么问题?
你能帮我改正吗?

注意事项:
- 以下答案告诉我 Ingress 控制器本身属于loadbalancer"类型:

解决方案

ClusterIP 服务本身执行负载平衡.命名可能会令人困惑,因为 LoadBalancer 服务并不是唯一涉及负载平衡的服务 - LoadBalancer 实际上更像是云提供商请创建一个外部负载平衡器并指向它"在这项服务'.kubernetes ClusterIP 服务还使用 kube-proxy 在不同节点中的 Pod 之间进行负载平衡.如果您不希望 kubernetes 进行负载均衡,那么您必须通过 创建无头服务.

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?

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:

https://medium.com/google-cloud/kubernetes-nodeport-vs-loadbalancer-vs-ingress-when-should-i-use-what-922f010849e0

解决方案

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.

这篇关于澄清 Ingress 负载均衡器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆