从私有迁移到公共时重用ALB

huangapple go评论73阅读模式
英文:

Reuse ALB when moving from private to public

问题

Currently, I am using AWS Direct Connect.

So, both ALB and Cluster of EKS are in private network.

Now, I want to allow access from outside.

So I change the ALB's subnet to public.

However, it still has no global IP address.

And Scheme keeps Internal.

In this case, I need to make the new ALB or is it possible to change Internal to Internet-facing for re-use ALB.

And, the setting like this below is possible?

EKS (in private) - ALB (in public)

I wonder, if it works, what the purpose of setting such as put EKS in public?

Always put EKS in private is best practice?

英文:

Currently, I am using AWS Direct Connect.

So, both ALB and Cluster of EKS are in private network.

Now, I want to allow access from outside.

So I change the ALB's subnet to public.

However, it still has no global IP adress.

And Scheme keeps Internal

In this case , I need to make the new ALB or is it possible to change Internal to Internet-facing for re-use ALB

And, the setting like this below is possible?

EKS(in private) - ALB(in public)

I wonder, if it works, what the purpose of setting such as put EKS in public?

Always put EKS in private is best practice?

答案1

得分: 1

你基本上需要创建两个负载均衡器:一个是面向内部的,一个是面向外部的。外部负载均衡器接受互联网流量,而内部负载均衡器接受内部流量,即来自VPC或连接到VPC的网络的流量。如果您的服务只需被集群内的其他服务访问,您只需创建一个类型为ClusterIP的服务。您应该能够通过创建两个入口定义将您的服务注册到两个负载均衡器中。每个入口定义都将有自己的ingressGroup,详细信息请参阅https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.5/guide/ingress/annotations/#ingressgroup。您还可以使用targetGroupBinding CRD来执行此操作,但我建议首先尝试使用ingress。

您无法为ALB分配静态IP地址。如果您想在ALB中使用静态IP,您需要遵循这个模式,https://repost.aws/knowledge-center/alb-static-ip。

英文:

You basically need to create 2 load balancers: 1 internal facing, 1 external facing. The external load balancer accepts internet traffic whereas the internal load balancer accepts internal traffic, i.e. traffic originating from the VPC or networks connected to the VPC. If your service only needs to be accessed by other services within the cluster, you only need to create a service of type ClusterIP. You should be able to register your service with both load balancers by creating 2 ingress definitions. Each ingress definition will have its own ingressGroup, see https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.5/guide/ingress/annotations/#ingressgroup for additional information. You could also do this, using the targetGroupBinding CRD but I would try ingress first.

You can't assign a static IP address to an ALB. If you want to use a static IP with an ALB you need to follow this pattern, https://repost.aws/knowledge-center/alb-static-ip.

huangapple
  • 本文由 发表于 2023年5月10日 13:04:25
  • 转载请务必保留本文链接:https://go.coder-hub.com/76215060.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定