linux ingress-controller elb pending

2021-10-20 16:15:33 浏览数 (2)


修复 nginx-ingress service 不自动生成aws-elb问题

代码语言:javascript复制
my-nginx-ingress-ingress-nginx-controller LoadBalancer 192.168.2.12 <pending> 80:32222/TCP,443:32223/TCP 2m7s

打开 kube-controller-manager 日志发现报错:

代码语言:javascript复制
event.go:291] "Event occurred" object="nginx-ingress/my-nginx-ingress-ingress-nginx-controller" kind="Service" apiVersion="v1" type="Warning" reason="SyncLoadBalancerFailed" message="Error syncing load balancer: failed to ensure load balancer: could not find any suitable subnets for creating the ELB"

解决:

代码语言:javascript复制
kubectl --kubeconfig=../kubeconfig/****/config annotate svc my-nginx-ingress-ingress-nginx-controller -n nginx-ingress service.beta.kubernetes.io/aws-load-balancer-internal="true"

0 人点赞