Below you will find pages that utilize the taxonomy term “CoreDNS”
Posts
read more
Kubernetes override public DNS name
How can I rewrite some publicly resolvable foo.example.com to an in-cluster service?
kubectl run curl \
--stdin --tty --rm \
--image=radial/busyboxplus:curl
nslookup foo.example.com
As expected, it’s unable to resolve|curl:
Server: 10.152.183.10
Address 1: 10.152.183.10 kube-dns.kube-system.svc.cluster.local
nslookup: can't resolve 'foo.example.com'
curl http://foo.example.com:8080/healthy
curl: (6) Couldn't resolve host 'foo.example.com'
Exit the curl pod so that the DNS may be refreshed.
If the cluster uses [CoreDNS]:
kubectl get deployment \
--selector=k8s-app=kube-dns \
--namespace=kube-system \
--output=name
deployment.apps/coredns
Let’s create an in-cluster service to act as the target: