External DNS Server

Hi!

Bit of a newbee to the Docker/Rancher community, currently evaluating it for hosting internal applications (GitLab, Taiga, Drone) from within the company I work for.

So far so good, I love the simple and all-round solution that Rancher provides!

My question is around DNS. I currently have a internal company DNS server that redirects ‘gitlab.example.com’ to the correct Virtual Machine IP Address that is running the Gitlab service.

When running Rancher I have managed to get the gitlab catalog up and running, and accessible by http://[host-ip]:81.

Now asking people to access Gitlab via a IP/Port combo isn’t ideal, I also understand that Docker Swarm can distribute the containers to different hosts, so the IP address could be dynamic.

What is the suggested way of integrating an internal DNS Server into Rancher? An ideal scenario would be that I can create a A record, for example gitlab.example.com and it will point to the Gitlab container on port 81.

I did notice that rancher offers some nice integration with third party DNS services such as route53, sadly due to the data-sensitive nature of the company an internal solution would be preferred.

Can anyone shine some light on the best way of going about this?

Thanks!

The next external-dns provider going in will be “DNS Update (RFC 2136)”, which you can use to configure a zone in a standard DNS server (e.g. bind) that accepts transfers.

Thanks for that Vincent! Is there any way of doing it manually for the time being ?

Well, manually would be you creating records with the right makes pointed to the right host IPs… So sure, you can do that manually :slight_smile:

Labeling hosts and using the global scale + scheduling rules to limit containers to a certain set f hosts can make manually managing easier by giving you a known set of host IPs to configure…

Will that still require the port number to be in the URL? Unless its port 80/443 of course.

I’m planning to use nginx to solve this.

I’ve discovered and planning to use this project to solve this issue: https://github.com/jwilder/nginx-proxy

Here’s a great description of the problem I’m trying to solve: http://www.yannmoisan.com/docker.html

The built-in load balancer service can do hostname or path-based routing of requests to different target services and SSL-termination so that multiple things can “share” 80/443.

Awesome vincent, just tried the load balancer and it worked fine!

Used this as reference:

http://rancher.com/virtual-host-routing-using-rancher-load-balancer/