如何通过LoadBalancer确定IP地址?

How to determine the IP address through LoadBalancer?

我在一个服务中有两个相同的任务。

此任务有 httpd。

它有不同的 IP 地址 56.XX.XX.12,56.XX.XX.15

我可以访问这两个地址并获得响应。 56.XX.XX.12,56.XX.XX.15

现在我尝试将原始域名附加到此 fargate,但根据我的理解,我应该自动访问 LoadBalancer IP 地址和 LoadBalancer select 目标任务,我错了吗?

如果可以,我在哪里可以找到 LoadBalancer IP?

来自 AWS 文档:

The IP addresses for Classic Load Balancers and Application Load Balancers change over time. Avoid using this information to statically configure your applications to point to these IP addresses.

您应该改用提供的 LoadBalancer DNS 名称。

Now I try to attach original domain name to this fargate though, from my understanding, I should access to LoadBalancer IP address and LoadBalancer select the target task automatically am I wrong?

AWS elastic/application 负载均衡器没有静态 IP,它们与 AWS DNS 名称相关联以公开应用程序。

来自 AWS 文档。

use your DNS service, such as your domain registrar, to create a CNAME record to route queries to your load balancer. For more information, see the documentation for your DNS service.

CNAME 记录允许您使用域名将流量路由到其他资源。有关详细信息,请参阅文档。

关于将自定义 DNS 与负载均衡器链接的 AWS 文档:https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/using-domain-names-with-elb.html#dns-associate-custom-elb