<p>I understand that this question is asked dozen times, but nothing has helped me through internet searching. </p>

<p>My set up: </p>

<pre><code>CentOS Linux release 7.5.1804 (Core)
Docker Version: 18.06.1-ce
Kubernetes: v1.12.3
</code></pre>

<p>Installed by official guide and this one:<a href="https://www.techrepublic.com/article/how-to-install-a-kubernetes-cluster-on-centos-7/" rel="noreferrer">https://www.techrepublic.com/article/how-to-install-a-kubernetes-cluster-on-centos-7/</a></p>

<p>CoreDNS pods are in Error/CrashLoopBackOff state.</p>

<pre><code>kube-system   coredns-576cbf47c7-8phwt                 0/1     CrashLoopBackOff   8          31m
kube-system   coredns-576cbf47c7-rn2qc                 0/1     CrashLoopBackOff   8          31m
</code></pre>

<p>My /etc/resolv.conf:</p>

<pre><code>nameserver 8.8.8.8
</code></pre>

<p>Also tried with my local dns-resolver(router)</p>

<pre><code>nameserver 10.10.10.1
</code></pre>

<p>Setup and init: </p>

<pre><code>kubeadm init --apiserver-advertise-address=10.10.10.3 --pod-network-cidr=192.168.1.0/16
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
</code></pre>

<p>I tried to solve this with: 
Editing the coredns: root@kub~]# kubectl edit cm coredns -n kube-system
and changing </p>

<pre><code>proxy . /etc/resolv.conf
</code></pre>

<p>directly to </p>

<pre><code>proxy . 10.10.10.1
</code></pre>

<p>or 
    proxy . 8.8.8.8</p>

<p>Also tried to: </p>

<pre><code>kubectl -n kube-system get deployment coredns -o yaml |   sed 's/allowPrivilegeEscalation: false/allowPrivilegeEscalation: true/g' |   kubectl apply -f -
</code></pre>

<p>And still nothing helps me. </p>

<p>Error from the logs: </p>

<pre><code>plugin/loop: Seen "HINFO IN 7847735572277573283.2952120668710018229." more than twice, loop detected
</code></pre>

<p>The other thread - <a href="https://stackoverflow.com/questions/53075796/coredns-pods-have-crashloopbackoff-or-error-state">coredns pods have CrashLoopBackOff or Error state</a> didnt help at all, becouse i havent hit any solutions that were described there. Nothing helped.</p>

<p><strong>Even I have got such error and I successfully managed to work by below steps.</strong></p>

<p><strong>However, you missed 8.8.4.4</strong> </p>

<p>sudo nano /etc/resolv.conf</p>

<pre><code>nameserver 8.8.8.8
nameserver 8.8.4.4
</code></pre>

<p>run following commands to restart daemon and docker service</p>

<pre><code>sudo systemctl daemon-reload

sudo systemctl restart docker
</code></pre>

<p>If you are using kubeadm make sure you delete an entire cluster from master and provision cluster again.</p>

<pre><code>kubectl drain &lt;node_name&gt; --delete-local-data --force --ignore-daemonsets
kubectl delete node &lt;node_name&gt;
kubeadm reset
</code></pre>

<p>Once You Provision the new cluster </p>

<pre><code>kubectl get pods --all-namespaces
</code></pre>

<p>It Should give below expected Result</p>

<pre><code>NAMESPACE     NAME                       READY   STATUS    RESTARTS   AGE
kube-system   calico-node-gldlr          2/2     Running   0          24s
kube-system   coredns-86c58d9df4-lpnj6   1/1     Running   0          40s
kube-system   coredns-86c58d9df4-xnb5r   1/1     Running   0          40s
kube-system   kube-proxy-kkb7b           1/1     Running   0          40s
kube-system   kube-scheduler-osboxes     1/1     Running   0          10s
</code></pre>
