From 05587186a660b7a81b29293a8a4e29baee2e83fb Mon Sep 17 00:00:00 2001 From: Rebecca Zanzig Date: Wed, 20 Mar 2019 10:08:30 -0700 Subject: [PATCH] Add dns configuration info for CoreDNS users --- website/source/docs/platform/k8s/dns.html.md | 35 +++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/website/source/docs/platform/k8s/dns.html.md b/website/source/docs/platform/k8s/dns.html.md index 016e25dd5..f655dcb0d 100644 --- a/website/source/docs/platform/k8s/dns.html.md +++ b/website/source/docs/platform/k8s/dns.html.md @@ -36,7 +36,40 @@ EOF ``` -> **Note:** The `stubDomain` can only point to a static IP. If the cluster IP -of the `consul-dns` service changes, then it must be updated to continue +of the `consul-dns` service changes, then it must be updated in the config map to +match the new service IP for this to continue +working. This can happen if the service is deleted and recreated, such as +in full cluster rebuilds. + +## CoreDNS Configuration + +If you are using CoreDNS instead of kube-dns in your Kubernetes cluster, you will +need to update your existing `coredns` ConfigMap in the `kube-system` namespace to +include a proxy definition for `consul` that points to the cluster IP of the +`consul-dns` service. + +``` +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + addonmanager.kubernetes.io/mode: EnsureExists + name: coredns + namespace: kube-system +data: + Corefile: | + .:53 { + + } + consul { + errors + cache 30 + proxy . + } +``` + +-> **Note:** The consul proxy can only point to a static IP. If the cluster IP +of the `consul-dns` service changes, then it must be updated to the new IP to continue working. This can happen if the service is deleted and recreated, such as in full cluster rebuilds.