问题
I'm running kubeadm init --pod-network-cidr=10.244.0.0/16
to deploy k8s. After it i'm running kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/2140ac876ef134e0ed5af15c65e414cf26827915/Documentation/kube-flannel.yml
to install Flannel pod network.
Right after it i have core dns pods up and runnig, but logs say:
[INFO] plugin/reload: Running configuration MD5 = 4e235fcc3696966e76816bcd9034ebc7
CoreDNS-1.6.5
linux/amd64, go1.13.4, c2fd1b2
[ERROR] plugin/errors: 2 2304295940078007789.7023563928002468477. HINFO: read udp 10.244.1.3:60266->172.20.0.1:53: i/o timeout
[ERROR] plugin/errors: 2 2304295940078007789.7023563928002468477. HINFO: read udp 10.244.1.3:40761->172.20.0.1:53: i/o timeout
[ERROR] plugin/errors: 2 2304295940078007789.7023563928002468477. HINFO: read udp 10.244.1.3:50495->172.20.0.1:53: i/o timeout
[ERROR] plugin/errors: 2 2304295940078007789.7023563928002468477. HINFO: read udp 10.244.1.3:41244->172.20.0.1:53: i/o timeout
[ERROR] plugin/errors: 2 2304295940078007789.7023563928002468477. HINFO: read udp 10.244.1.3:37152->172.20.0.1:53: i/o timeout
[ERROR] plugin/errors: 2 2304295940078007789.7023563928002468477. HINFO: read udp 10.244.1.3:35273->172.20.0.1:53: i/o timeout
[ERROR] plugin/errors: 2 2304295940078007789.7023563928002468477. HINFO: read udp 10.244.1.3:36979->172.20.0.1:53: i/o timeout
[ERROR] plugin/errors: 2 2304295940078007789.7023563928002468477. HINFO: read udp 10.244.1.3:56856->172.20.0.1:53: i/o timeout
[ERROR] plugin/errors: 2 2304295940078007789.7023563928002468477. HINFO: read udp 10.244.1.3:59105->172.20.0.1:53: i/o timeout
[ERROR] plugin/errors: 2 2304295940078007789.7023563928002468477. HINFO: read udp 10.244.1.3:42423->172.20.0.1:53: i/o timeout
What am i doing wrong? How can i correct it?
回答1:
Core dns pods solely depends upon network plugins which is flannel in your case. If anything is wrong with flannel, dns pods won't start properly. Try installing latest version of flannel by executing below command as mentioned in flannel github ReadMe.md
.
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
来源:https://stackoverflow.com/questions/60095073/dns-pods-fail-afrer-kubeadm-init