<p>I'm currently setting up a Kubernetes cluster where both private and public services are run. While public services should be accessible via the internet (and FQDNs), private services should not (the idea is to run a VPN inside the cluster where private services should be accessible via <em>simple</em> FQDNs).</p>

<p>At the moment, I'm using nginx-ingress and configure Ingress resources where I set the hostname for public resources. external-dns then adds the corresponding DNS records (in Google CloudDNS) - this already works.</p>

<p>The problem I'm facing now: I'm unsure about how I can add DNS records in the same way (i.e. simply specifying a host in <code>Ingress</code> definitions and using some ingress-class <code>private</code>), yet have these DNS records only be accessible from within the cluster.</p>

<p>I was under the impression that I can add these records to the <code>Corefile</code> that CoreDNS is using. However, I fail to figure out how this can be automated.</p>

<p>Thank you for any help!</p>

borchero
<p>If you don't want them to be accessed publicly, you don't want to add ingress rules for them. Ingress is only to route external traffic into your cluster.</p>

<p>All your services are already registered in CoreDNS and accessible with their local name, no need to add anything else.</p>
