简体   繁体   English

将OVH提供的负载均衡器IP与k8s集群上的Nginx入口控制器集成

[英]Integrate a Load Balancer IP given by OVH with a Nginx Ingress Controller on a k8s cluster

I have a Load Balancer IP provided by OVH that I want to use with Nginx Ingress Controller but on a on-premises cluster. 我有一个由OVH提供的负载均衡器IP,我想与Nginx Ingress Controller一起使用,但在本地群集上。 There are several guide s to do that using OVH Managed Kubernetes but it is not possible for me since I already a cluster. 有几个使用OVH托管Kubernetes进行操作的指南,但是对我来说这是不可能的,因为我已经是一个集群了。

I tried to use the LoadBalancerIP option using Helm and without Helm as well... 我尝试在不使用Helm的情况下也使用使用Helm的LoadBalancerIP选项...

You should expose Nginx Ingress Controller as NodePort and point your OVH Load Balancer to your workers as endpoints. 您应该将Nginx Ingress Controller作为NodePort公开,并将OVH Load Balancer指向作为端点的工作程序。

User ---> OVH LB ----> Nginx Ingress on workers 用户---> OVH LB ----> Nginx工人的入口

Thank you for both you answer. 谢谢您的回答。 I tried what you recommended but I think I'm missing a point. 我尝试了您的建议,但我想漏掉一点。 TO be more clear : 更清楚地说:

1/ The user part -> I have a OVH LB connected to a server of 3 node, this LB selects a node to be used by a user (round robin) 1 /用户部分->我有一个连接到3个节点的服务器的OVH LB,此LB选择一个用户要使用的节点(循环)

2/ Once a node had been selected, the user should be able to access to whatever service inside Kubernetes even if the service is not on this node by using the LoadBalancer IP. 2 /一旦选择了一个节点,即使该服务不在该节点上,也可以使用LoadBalancer IP来访问Kubernetes内部的任何服务。

For the 2nd point, I tried to expose/create an endpoint for the Nginx Ingress Controller where I gave the LB's IP, but I don't know if I have to create an Ingress object for each service (only 2-3 like grafana, prometheus..). 关于第二点,我尝试公开/创建Nginx Ingress Controller的端点,并在其中提供了LB的IP,但是我不知道是否必须为每个服务创建一个Ingress对象(像grafana这样只有2-3个对象,普罗米修斯..)。 I tried it but it didn't work. 我尝试过,但是没有用。 I also tried to create an Ingress for the service where I gave the LB IP but it didn't work. 我还尝试为提供LB IP的服务创建一个Ingress,但是它没有用。 Note that my k8s cluster is on LXD containers which are inside 3 connected servers (one LXD container by server node). 请注意,我的k8s集群位于3台连接的服务器(每个服务器节点一个LXD容器)内部的LXD容器上。 Also, concerning the OVH LoadBalancer, I'm not very confident with the purpose of Outbound IPs (which is a CIDR range).. 另外,关于OVH LoadBalancer,我对出站IP(这是CIDR范围)的用途不是很自信。

I understand that my OVH LB cannot be auto provisioned, but since its job is done outside of k8s (just attributing a node to a user), the problem is : how does the node can access the service based on a URL like grafana.example.com? 我知道我的OVH LB无法自动配置,但是由于它的工作是在k8s之外完成的(只是将节点分配给用户),问题是:节点如何基于grafana.example这样的URL来访问服务。 .COM? I was using MetalLB as an internal LB and it worked fine but now i'm struggling with the OVH LB.. 我使用MetalLB作为内部LB,它工作正常,但现在我在OVH LB上苦苦挣扎。

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

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