kubernetes - How does an external load balancer learn of istio ingress gateways
问题描述
When using an external load balancer with istio ingress gateways (multiple replicas spread across different nodes), how does it identify which istio ingress gateway it can possibly hit i.e. I can manually access nodeip:nodeport/endpoint for any node manually but how is an external load balancer expected to know all nodes.
Is this manually configured or does the load balancer consume this info from an API Is there a recommended strategy for bypassing an external load balancer eg. roundrobin across a DNS which is aware of the node ip / port ?
The root of this question is - how do we avoid a single point of failure . Using multiple istio ingress gateway replicas achieves this in istio but then the the external load balancer / load balancer cluster needs to know the replicas . Is this automated or a manual config or is there a single virtual endpoint that the external load balancer hits?
解决方案
External load balancers are generally configured to do health check on your set of nodes (over /healthz
endpoint or some other method), and balance the incoming traffic using an LB algorithm, by sending the packets it receives to one of the healthy nodes over the service's NodePort.
In fact, that's mostly the reason why NodePort type services exist in the first place - they don't have much of an usage by themselves, but they are the intermediate steps between modes LoadBalancer
and ClusterIP
.
How does the load balancer know about the nodes? It heavily depends on the load balancer. As an example, if you use MetalLB in BGP mode, you need to add your nodes as peers to your external BGP router (either manually or in an automated way). MetalLB takes care of advertising the IPs of the LoadBalancer type services to the router. This means, that router effectively becomes the load balancer of your cluster.
There are also a number of enterprise-grade commercial Kubernetes load balancers out there, such as F5 Big-IP.
推荐阅读
- jquery - 成功的ajax请求和if语句
- javascript - JsStore中的date_time格式是什么
- javascript - 如何使用 onclick 事件切换反向操作
- python - 正则表达式时间,日期,id
- java - java - 如何创建一个包含随机键和值的映射java?
- sql - 在 SQL+(Oracle) 中显示表之间的关系?
- reactjs - 无法使 react-leaflet 动态更新标记:它给出了 TypeError: Cannot read property 'leafletElement' of undefined
- twilio - 无法使用 SMS twilio 长代码传递给应用程序的单词
- java - 错误:无效的客户端 - 使用 Spring Boot 登录 Apple
- sql - Flink 中对数据流执行 sql 查找的最有效方法