Kubernetes DNS lookup issue and "invalid" in the /etc/resolv.conf file Kubernetes DNS lookup issue and "invalid" in the /etc/resolv.conf file kubernetes kubernetes

Kubernetes DNS lookup issue and "invalid" in the /etc/resolv.conf file


As configured in CoreDNS ConfigMap default upstream nameservers are inherited from node, that is everything outside the cluster domain (.cluster.local)

So "invalid" is an entry copied from Node's /etc/resolv.conf file during Pod creation.

If you would manually modify /etc/resolv.conf on you Node, every Pod with dnsPolicy: ClusterFirst will inherit /etc/resolv.conf with this modification.

So, after adding --node-ip flag to kubelet and restarting CoreDNS Pods you should re-deploy your busybox Pod so it can inherit /etc/resolv.conf from the Node.