Search code examples
kubernetescoredns

coredns running status but not become ready


I have a k8s cluster with three masters, two workers, and an external haproxy and use flannel as a cni. The coredns have problems, and their status is running, but they don't become ready.

Coredns log

1

I get the logs of this pod, and I get this message:

[INFO] plugin/ready: Still waiting on: "Kubernetes."

What I do to solve this problem but didn't get any result:
1- check ufw and disable it.
2- check IPtables and flush them.
3- check Kube-proxy logs.
4- check the haproxy, and it is accessible from out and all servers in the cluster.
5- check nodes network.
7- reboot all servers at the end. :))

I get describe po :

describe pod


Solution

  • I solve the problem. It didn't relate to coredns. It was about the IPtables rule. Some rules for Kubernetes svc did not create. Now with the rules which are in the picture, everything is okay:

    iptables rules