如何解决“无法确保负载均衡器"Nginx入口错误 [英] How to fix "failed to ensure load balancer" error for nginx ingress

查看:72
本文介绍了如何解决“无法确保负载均衡器"Nginx入口错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Azure上使用头盔和静态ip设置新的nginx入口时,nginx控制器永远不会获得分配的静态IP.它总是说< pending> .

When setting a new nginx-ingress using helm and a static ip on Azure the nginx controller never gets the static IP assigned. It always says <pending>.

我按如下所示安装头盔图表-

I install the helm chart as follows -

helm install stable/nginx-ingress --name <my-name> --namespace <my-namespace> --set controller.replicaCount=2 --set controller.service.loadBalancerIP="<static-ip-address>"

它说它安装正确,但是列出了一个错误

It says it installs correctly but there is an error listed as well

E0411 06:44:17.063913 13264 portforward.go:303]复制错误远程流到本地连接:从tcp4读取127.0.0.1:57881->127.0.0.1:57886:写入tcp4 127.0.0.1:57881->127.0.0.1:57886:wsasend:已建立的连接已被主机中的软件中止.

E0411 06:44:17.063913 13264 portforward.go:303] error copying from remote stream to local connection: readfrom tcp4 127.0.0.1:57881->127.0.0.1:57886: write tcp4 127.0.0.1:57881->127.0.0.1:57886: wsasend: An established connection was aborted by the software in your host machine.

然后我执行 kubectl获取所有-n< my-namespace> ,并且所有内容都正确列出,仅使用外部IP作为控制器的< pending>

I then do a kubectl get all -n <my-namespace> and everything is listed correctly just with the external IP as <pending> for the controller.

然后我执行 kubectl描述-n< my-namespace>服务/< my-name> -nginx-ingress-controller ,并且此错误在事件-

I then do a kubectl describe -n <my-namespace> service/<my-name>-nginx-ingress-controller and this error is listed under Events -

警告CreationLoadBalancerFailed 11s(x4超过47s)服务控制器创建负载均衡器时出错(将重试):失败确保负载均衡器正常工作my-namespace/my-name-nginx-ingress-controller:超时等待条件.

Warning CreatingLoadBalancerFailed 11s (x4 over 47s) service-controller Error creating load balancer (will retry): failed to ensure load balancer for service my-namespace/my-name-nginx-ingress-controller: timed out waiting for the condition.

谢谢你

推荐答案

对于您的问题,可能的原因是您的公共IP与AKS群集不在同一资源组和区域中.请参阅使用静态公共IP地址创建入口控制器中的步骤在Azure Kubernetes Service(AKS)中.

For your issue, the possible reason is that your public IP is not in the same resource group and region with the AKS cluster. See the steps in Create an ingress controller with a static public IP address in Azure Kubernetes Service (AKS).

您可以通过CLI命令获得AKS组,如下所示:

You can get the AKS group through the CLI command like this:

az aks show --resource-group myResourceGroup --name myAKSCluster --query nodeResourceGroup -o tsv

当您的公共IP位于不同的组和地区时,它将像您一样给出超时错误.

When your public IP in a different group and region, then it will give the time out error as you.

这篇关于如何解决“无法确保负载均衡器"Nginx入口错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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