AWS ALB Service在Kubernetes
我想为在 Kubernetes 中运行的 Traefik 部署应用程序负载均衡器。因此,我尝试了以下操作:
kind: Service
apiVersion: v1
metadata:
name: traefik-application-elb
namespace: kube-system
annotations:
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "tcp"
service.beta.kubernetes.io/aws-load-balancer-type: "elb"
service.beta.kubernetes.io/aws-load-balancer-name: "eks-traefik-application-elb"
service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags: "App=traefik,Env=dev"
spec:
type: LoadBalancer
ports:
- protocol: TCP
name: web
port: 80
- protocol: TCP
name: websecure
port: 443
selector:
app: traefik
但是创建了面向互联网的 Classic
负载均衡器。 还尝试了 service.beta.kubernetes.io/aws-load-balancer-type: "alb"
但没有任何改变。
这里出了什么问题?
I want to deploy Application Load Balancer for Traefik running in Kubernetes. So, I tried the following:
kind: Service
apiVersion: v1
metadata:
name: traefik-application-elb
namespace: kube-system
annotations:
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "tcp"
service.beta.kubernetes.io/aws-load-balancer-type: "elb"
service.beta.kubernetes.io/aws-load-balancer-name: "eks-traefik-application-elb"
service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags: "App=traefik,Env=dev"
spec:
type: LoadBalancer
ports:
- protocol: TCP
name: web
port: 80
- protocol: TCP
name: websecure
port: 443
selector:
app: traefik
But internet-facing Classic
load balancer was created.
Also tried service.beta.kubernetes.io/aws-load-balancer-type: "alb"
but nothing changed.
What is wrong here ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从文档中: https://docs.aws。 Amazon.com/eks/latest/userguide/network-load-balancing.html
ALB不受K8S负载平衡器的支持。您可以根据需要指定NLB。
但是,您可以将ALB用作带有这样的部署的入口控制器 - https://aws.amazon.com/blogs/containers/introducing-aws-load-balancer-controller/
From the docs: https://docs.aws.amazon.com/eks/latest/userguide/network-load-balancing.html
ALB is not supported as a k8s load balancer. You can specify an NLB if desired.
However you can use ALB as an ingress controller with a deployment like this - https://aws.amazon.com/blogs/containers/introducing-aws-load-balancer-controller/