In this post, we will see how to resolve Terraform and route 53: redirect to home router with nginx load balancer
Question:
I own a domain name, let’s sayfancydomain.com
(managed through AWS). I also have a kubernetes cluster running somewhere (but not on AWS), with a nginx ingress controller that acts as a load balancer. I have the IP of the load balancer.I would like to point the domain name to the IP of the load balancer, and I would like the load balancer to handle the TLS certificate. But I’m struggling in two places:
- It looks like I’m failing to properly redirect to the IP of the LB
- I don’t understand how/where the TLS certificate (created by AWS) should be integrated
So far this is my terraform:
/etc/hosts
like below, I managed to access the domain by querying https://fancydomain.com
.:/etc/hosts
EDIT: The name servers for the registered domain are the same as the hosted zone’s ones:


Best Answer:
Ultimately I think @erik258 was right, I think the name servers of the registered domain probably weren’t in sync with the ones from the hosted zone. I ended up using a data source for the name servers of the zone, and I used it to set the ones in the register domain. Behold:If you have better answer, please add a comment about this, thank you!
Source: Stackoverflow.com