Symptom: pods can resolve kubernetes.default but fail on
external domains. The quickest path is to verify whether CoreDNS can
talk to the upstream resolvers and whether the node can route to
them.
Checklist
# CoreDNS logs
microk8s kubectl -n kube-system logs -l k8s-app=kube-dns --tail=200
# CoreDNS config
microk8s kubectl -n kube-system get cm coredns -o yaml
# From a pod, check basic name resolution
microk8s kubectl run -it --rm dns-test --image=busybox:1.36 --restart=Never -- nslookup example.com
If the upstreams are wrong, fix the CoreDNS configmap, then restart the deployment:
microk8s kubectl -n kube-system edit cm coredns
microk8s kubectl -n kube-system rollout restart deploy/coredns
If upstreams are correct but it still fails, verify node-level DNS and routing. In many cases it is a host firewall rule or a broken upstream that was assumed to be reliable.