0

I was given a task of creating a cluster on aws, which I did (stage environment). Since that will be used as our stage environment where we will be using kubernetes.

But there is a problem, since our DNS entries for our apps (there are about three) are already used for our present stage environment that is not in the kubernetes cluster, I was given a task of creating a private DNS server, where those DNS entries (that are already used) will be used for the kubernetes environment.

So, basically I have to make a private DNS server that when used with our VPN connection, will resolve the DNS names to the kubernetes cluster not the other stage environment that is in use.

Since I never did something like that, my questions are:

1.) I probably need to install s DNS server on an ec2 instance, but what configuration do I need to put it there?

2.) How do I connect our VPN connection to the private DNS server, so that every one that uses it first resolves to the kubernetes cluster first?

In general I dont know if there are any other ways of resolving this problem, so If anyone has some tips, I'm all ears :)

  • Things to look at: Route53 private hosted zone. Not sure if you can connect your VPN to it. Another option (and there's a very good chance this won't work) might be to have DNS on-premise and use DHCP Option Sets to use it. – Tim Dec 13 '17 at 18:24
0

Provided that your two environments are in two VPCs and not the same VPC, the simplest method is to configure two Private Hosted Zones in Route53. You then assign one VPC to one PHZ and the other VPC to the other PHZ. You can then use the same resource record names but pointing to different resources. The DNS server in each VPC will use the correct PHZ that you assigned to resolve queries.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.