Skip to content

Commit 7b01e76

Browse files
author
Aaron Schlesinger
committed
doc(configuring-dns.md): adding instructions for configuring Google Cloud DNS
1 parent e2a883b commit 7b01e76

1 file changed

Lines changed: 45 additions & 1 deletion

File tree

src/managing-workflow/configuring-dns.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ LoadBalancer Ingress: a493e4e58ea0511e5bb390686bc85da3-1558404688.us-west-2.elb.
2929

3030
The `LoadBalancer Ingress` field typically describes an existing domain name or public IP(s). Note that if Kubernetes is able to automatically provision a load balancer for you, it does so asynchronously. If the command shown above is issued very soon after Workflow installation, the load balancer may not exist yet.
3131

32-
3332
## Without a Load Balancer
3433

3534
On some platforms (Vagrant, for instance), a load balancer is not an easy or practical thing to provision. In these cases, one can directly identify the public IP of a Kubernetes node that is hosting a router pod and use that information to configure the local `/etc/hosts` file.
@@ -59,6 +58,50 @@ Addresses: 10.0.0.199,10.0.0.199,54.218.85.175
5958

6059
Here, the `Addresses` field lists all the node's IPs. If any of them are public, again, they may be used to configure your local `/etc/hosts` file or may be used with [xip.io][xip].
6160

61+
## Tutorial: Configuring DNS with [Google Cloud DNS][cloud dns]
62+
63+
In this section, we'll describe how to configure Google Cloud DNS for routing your domain name to your Deis cluster.
64+
65+
We'll assume the following in this section:
66+
67+
- Your Deis router service has a load balancer in front of it.
68+
- The load balancer need not be cloud based, it just needs to provide a stable IP address or a stable domain name
69+
- You have the `mystuff.com` domain name registered with a registrar
70+
- Replace your domain name with `mystuff.com` in the instructions to follow
71+
- Your registrar lets you alter the nameservers for your domain name (most registrars do)
72+
73+
Here are the steps for configuring cloud DNS to route to your deis cluster:
74+
75+
1. Get the load balancer IP or domain name
76+
- If you are on Google Container Engine, you can run `kubectl get svc deis-router` and look for the `LoadBalancer Ingress` column to get the IP address
77+
2. Create a new Cloud DNS Zone (on the console: `Networking` => `Cloud DNS`, then click on `Create Zone`)
78+
3. Name your zone, and set the DNS name to `mystuff.com.` (note the `.` at the end
79+
4. Click on the `Create` button
80+
5. Click on the `Add Record Set` button on the resulting page
81+
6. If your load balancer provides a stable IP address, enter the following fields in the resulting form:
82+
1. `DNS Name`: `*`
83+
2. `Resource Record Type`: `A`
84+
3. `TTL`: the DNS TTL of your choosing. If you're testing or you anticipate that you'll tear down and rebuild many deis clusters over time, we recommend a low TTL
85+
4. `IPv4 Address`: The IP that you got in the very first step
86+
5. Click the `Create` button
87+
7. If your load balancer provides the stable domain name `lbdomain.com`, enter the following fields in the resulting form:
88+
1. `DNS Name`: `*`
89+
2. `Resource Record Type`: `CNAME`
90+
3. `TTL`: the DNS TTL of your choosing. If you're testing or you anticipate that you'll tear down and rebuild many deis clusters over time, we recommend a low TTL
91+
4. `Canonical name`: `lbdomain.com.` (note the `.` a the end)
92+
5. Click on the `Create` button
93+
8. In your domain registrar, set the nameservers for your `mystuff.com` domain to the ones under the `data` column in the `NS` record on the same page. They'll often be something like the below (note the trailing `.` characters).
94+
95+
```
96+
ns-cloud-b1.googledomains.com.
97+
ns-cloud-b2.googledomains.com.
98+
ns-cloud-b3.googledomains.com.
99+
ns-cloud-b4.googledomains.com.
100+
```
101+
102+
103+
Note: If you ever have to re-create your deis cluster, simply go back to step 6.4 or 7.4 (depending on your load balancer) and change the IP address or domain name to the new value. You may have to wait for the TTL you set to expire.
104+
62105

63106
## Testing
64107

@@ -85,3 +128,4 @@ Since such requests require authentication, a response such as the following sho
85128
[AWS recommends]: https://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/using-domain-names-with-elb.html
86129
[load balancer]: configuring-load-balancers.md
87130
[xip]: http://xip.io/
131+
[cloud dns]: https://cloud.google.com/dns/docs

0 commit comments

Comments
 (0)