Kubernetes DigitalOcean上的外部负载均衡器服务 [英] Kubernetes External Load Balancer Service on DigitalOcean

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

问题描述

我正在DigitalOcean上使用CoreO和Kubernetes构建容器集群,并且我已经看到,为了向世界展示Pod,您必须创建一个类型为LoadBalancer的服务.我认为这是最佳的解决方案,因此您无需在kubernetes之外(例如nginx或haproxy)添加外部负载均衡器.我想知道是否可以使用DO的浮动IP来创建它.

I'm building a container cluster using CoreOs and Kubernetes on DigitalOcean, and I've seen that in order to expose a Pod to the world you have to create a Service with Type: LoadBalancer. I think this is the optimal solution so that you don't need to add external load balancer outside kubernetes like nginx or haproxy. I was wondering if it is possible to create this using DO's Floating IP.

推荐答案

通过将代码添加到特定于每个云提供商的kubernetes主数据库中,可以实现LoadBalancer类型的服务.没有适用于Digital Ocean的云提供商(受支持云提供商),因此LoadBalancer类型将无法利用Digital Ocean的浮动IP.

The LoadBalancer type of service is implemented by adding code to the kubernetes master specific to each cloud provider. There isn't a cloud provider for Digital Ocean (supported cloud providers), so the LoadBalancer type will not be able to take advantage of Digital Ocean's Floating IPs.

相反,您应该考虑使用 NodePort服务或将 ExternalIP 附加到您的服务并映射将IP暴露为DO浮动IP.

Instead, you should consider using a NodePort service or attaching an ExternalIP to your service and mapping the exposed IP to a DO floating IP.

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

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