<p>I want to add a extra DNS server as a pod (internal for the other pods). </p>

<p>Kube-DNS works fine, the pods can resolve the short-names of the others and could find the extra dns-pod by : #>host dns </p>

<p>So far so good. The resolve.conf on all of the pods have only the coredns entry (namesever CLUSTER_IP). </p>

<p>I I manually add a second name server to the resolve.conf but it do not work. Now I thought about a extra rule in the Kube-DNS to forward requests to the dns-pod. But have no idea if this is the right way to go. Furthermore I do not know the ip of the dns-pod during auto-creation of the complete setup (terraform). </p>

<p>Would be nice to receive some tips how this should be done. </p>

<p>best</p>

<p>Setup a <a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="nofollow noreferrer">Service</a> for your DNS pod, specifying a cluster IP in your allocated cluster service range.</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  name: my-dns-service
spec:
  selector:
    app: dns-app
  ports:
    - protocol: UDP
      port: 53
      targetPort: 53
    - protocol: TCP
      port: 53
      targetPort: 53
  clusterIP: 10.233.8.8
</code></pre>

<p><a href="https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/#coredns" rel="nofollow noreferrer">Configure CoreDNS</a> to forward your custom domains to that cluster IP. </p>

<p>Modify the <code>coredns</code> ConfigMap to include the <a href="https://coredns.io/plugins/forward/" rel="nofollow noreferrer">forward plugin</a></p>

<pre><code>    domain:53 {
        errors
        cache 30
        forward . 10.233.8.8
    }
    internal.domain:53 {
        errors
        cache 30
        forward . 10.233.8.8
    }
</code></pre>
