# Coredns is in CrashLoopBackOff state with "no nameservers found" error log

**URL:** https://discuss.kubernetes.io/t/coredns-is-in-crashloopbackoff-state-with-no-nameservers-found-error-log/17863
**Category:** General Discussions
**Tags:** development, coredns
**Created:** [October 22, 2021, 9:11am UTC](https://discuss.kubernetes.io/t/coredns-is-in-crashloopbackoff-state-with-no-nameservers-found-error-log/17863 "2021-10-22T09:11:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Daigo](https://avatars.discourse-cdn.com/v4/letter/d/db5fbb/32.png) [@Daigo](https://discuss.kubernetes.io/u/Daigo)
#### Post date: [October 22, 2021, 9:11am UTC](https://discuss.kubernetes.io/t/coredns-is-in-crashloopbackoff-state-with-no-nameservers-found-error-log/17863/1 "2021-10-22T09:11:33Z")

</div>

I have tried to build kubernetes using kubeadm on my bare-metal server, but it seemed that coredns failed to start after installing cni (weave-net).

Two coredns containerd are now in “CrashLoopBackOff” state, and the logs of them are:

```
plugin/forward: no nameservers found

```

And the description of “kubectl describe pod” is as follows:

```
Events:
  Type Reason Age From Message
  ---- ------ ---- ---- -------
  Warning FailedScheduling 4m52s (x9 over 13m) default-scheduler 0/1 nodes are available: 1 node(s) had taint {node.kubernetes.io/not-ready: }, that the pod didn't tolerate.
  Normal Scheduled 4m7s default-scheduler Successfully assigned kube-system/coredns-58cf647449-8pq7k to k8s
  Normal Pulled 3m13s (x4 over 4m6s) kubelet Container image "localhost:5000/coredns:v1.8.4" already present on machine
  Normal Created 3m13s (x4 over 4m6s) kubelet Created container coredns
  Normal Started 3m13s (x4 over 4m6s) kubelet Started container coredns
  Warning Unhealthy 3m13s kubelet Readiness probe failed: Get "http://10.32.0.3:8181/ready": dial tcp 10.32.0.3:8181: connect: connection refused
  Warning BackOff 2m54s (x12 over 4m5s) kubelet Back-off restarting failed container

```

I have already tried using calico instead of weave, but the result was the same.  
There’s no settings in /etc/resolv.conf file.  
How can I deal with this problem?

### Cluster information:

Kubernetes version: 1.22.1  
Cloud being used: bare-metail  
Installation method: kubeadm  
Host OS: RedHat Enterprise Linux 8.4 (minimal install)  
CNI and version: weave-net 1.16  
CRI and version: containerd 1.4.11

---

<div class="post-metadata">

### Author: ![Daigo](https://avatars.discourse-cdn.com/v4/letter/d/db5fbb/32.png) [@Daigo](https://discuss.kubernetes.io/u/Daigo)
#### Post date: [October 26, 2021, 6:03am UTC](https://discuss.kubernetes.io/t/coredns-is-in-crashloopbackoff-state-with-no-nameservers-found-error-log/17863/2 "2021-10-26T06:03:08Z")

</div>

The coredns pods worked when I switch to Docker from containerd so I may need to configure something about containerd?  
And with containerd, when I write some settings like “nameserver 8.8.8.8” in /etc/resolv.conf, the coredns pod seemed to be working.

---

<div class="post-metadata">

### Author: ![azi](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@azi](https://discuss.kubernetes.io/u/azi)
#### Post date: [August 10, 2022, 11:32pm UTC](https://discuss.kubernetes.io/t/coredns-is-in-crashloopbackoff-state-with-no-nameservers-found-error-log/17863/3 "2022-08-10T23:32:10Z")

</div>

Thanks for finding a solution for this: [domain name system - kubernetes coredns is in CrashLoopBackOff status with "no nameservers found" error - Server Fault](https://serverfault.com/questions/1081685/kubernetes-coredns-is-in-crashloopbackoff-status-with-no-nameservers-found-err)

Seems odd that by default it’ll fail and not handle a forwarder. Easy fix at least.
