<p>Is it possible to add a custom DNS entry (type A) inside Kubernetes 1.19? I'd like to be able to do:</p>
<pre><code>kubectl run -it --rm --restart=Never --image=infoblox/dnstools:latest dnstools
host custom-dns-entry.example.com
custom-dns-entry.example.com has address 10.0.0.72
</code></pre>
<p>with <code>custom-dns-entry.example.com</code> not being registered inside my upstream DNS server (and also not having a corresponding k8s service at all).
Following example <a href="https://coredns.io/2017/05/08/custom-dns-entries-for-kubernetes/" rel="nofollow noreferrer">https://coredns.io/2017/05/08/custom-dns-entries-for-kubernetes/</a> seems to provide a solution, but it is a bit complex and it may be deprecated. Is there a simpler way to do it please? For example with a few <code>kubectl</code> commands?</p>
<p><em>The reason why I need this is because I run my workload on <code>kind</code> so my ingress DNS record is not registered inside upstream DNS and some pods require access to this ingress DNS record from inside (maybe to configure a javascript client provided by the pods which will effectively access the ingress DNS record from outside...). However I cannot modify the workload code as I am not maintaining it, so addgin this custom DNS entry seems to be a reasonable solution</em></p>

<p>CoreDNS would be the place to do this. You can also do similar-ish things using ExternalName-type Services but that wouldn't give you full control over the hostname (it would be a Service name like anything else).</p>
