简体   繁体   English

Kubernetes负载均衡器AWS

[英]Kubernetes Load Balancers AWS

We've currently got a production application using Kubernetes on AWS. 当前,我们已经在AWS上使用Kubernetes获得了一个生产应用程序。 Everything's working very well except I think we've made a misconfiguration problem. 一切工作都很好,但我认为我们犯了一个配置错误的问题。

We expose different services from within the cluster on domain names and we're now up to about 5 different services. 我们从群集中的域名中公开了不同的服务,现在最多可以提供5种不同的服务。 Kubernetes' standard way to expose these services is through load balancers, but in our config we've created 6 load balancers. Kubernetes公开这些服务的标准方法是通过负载均衡器,但是在我们的配置中,我们创建了6个负载均衡器。 As you can imagine that many load balancers running can incur substantial cost overheads. 可以想象,运行许多负载均衡器会产生可观的成本开销。

Is there any way to configure an individual load balancer to route to kubernetes targets based on domain names? 有什么方法可以配置单个负载均衡器以基于域名路由到kubernetes目标? So we can have one domain pointing at an ELB and have that route to the correct services internally? 因此,我们可以有一个域指向ELB,并在内部具有通往正确服务的路由?

You can use Ingress controller. 您可以使用Ingress控制器。 Ingress will setup a single AWS load balancer and can be used to expose many services. Ingress将设置一个AWS负载均衡器,并且可以用于公开许多服务。 If you services are all HTTP based, it should work quite well. 如果您的服务全部基于HTTP,则应该可以正常工作。 For more information about ingress you can have a look to the Kubernetes docs or at the default Nginx based implementation . 有关入口的更多信息,请查看Kubernetes文档或默认的基于Nginx的实现 If needed there are also some other implementations using for example Envoy proxy etc. 如果需要,还可以使用Envoy代理等其他一些实现。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM