首页 > 解决方案 > 使用 Parallels RAS 或 NGINX 进行 kubernetes 负载平衡

问题描述

也许我在追求在本地网络上创建尽可能接近真实的 Kubernetes 设置方面还有很长的路要走:-)

是否可以使用 Parallels(Desktop) RAS 作为 Kubernetes 的负载均衡器?

1. I am running a master node in Ubuntu on Parallels Desktop 
2. And some worker nodes also in Parallels Desktop

两者都使用桥接网络。

如果可以有一个包含 LoadBalancer 的设置,那就太酷了。

标签: nginxkubernetesparallels

解决方案


您可以使用MetalLBKubeVIPKeepalived-operator(使用 HAProxy)。我玩过 KubeVIP,但现在在我基于 RasberryPi 的 Kubernetes 集群中使用 MetalLB L2。如果您有一个支持该协议的路由器(例如 Unifi),MetalLB BGP 会更好。以下参考资料可能会有所帮助:

  1. https://www.openshift.com/blog/self-hosted-load-balancer-for-openshift-an-operator-based-approach
  2. https://www.youtube.com/watch?v=9PLw1xalcYA
  3. http://blog.cowger.us/2019/02/10/using-metallb-with-the-unifi-usg-for-in-home-kubernetes-loadbalancer-services.html

推荐阅读