简体   繁体   中英

Can we point multiple domain names to the same IP address?

I have two GKE cluster (GKE-OLD and GKE-NEW) running behind two separate load balancers.

The GKE-OLD cluster runs behind a L4 global load balancer where as the GKE-NEW cluster runs behind a L7 load balancer.

The services of the clusters are accessible through two separate domain names.

www.service.company.com points to the L4 load balancer behind which the GKE-OLD cluster is running.

www.service-1.company.com points to the L7 load balancer behind which the GKE-NEW cluster is running.

在此处输入图像描述

I want to eventually get rid of the old cluster and LB associated with it. However, I want to keep the domain name (www.service.company.com) from the old cluster and eventually retire the www.service-1.company.com domain name that is associated with the new cluster.

Before I decommission the old cluster, the current setup I want to have should look something like this: 在此处输入图像描述

My questions are:

Can we have multiple domains pointing at same IP address (LB) and same domain pointing at multiple IP addresses (LBs) at the same time? www.service.company.com and www.service-1.company.com pointing at the same load balancer. And www.service.company.com pointing at both L4 and L7 LBs.

Can we have multiple domains pointing at same IP address (LB) and same domain pointing at multiple IP addresses (LBs)

Yes you can have multiple names resolve to the same IP address (either directly with A and AAAA or through CNAME records), and yes you can have a name resolving to multiple IP addresses (again through direct A + AAAA records or through CNAME records), but in which case, except if there is some specific tooling on the client side (the application consuming those records), things will work in a load balancing fashion among all addresses, not in failover fashion.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM