kelseyhightower / kubernetes-the-hard-way

Bootstrap Kubernetes the hard way. No scripts.
Apache License 2.0
40.56k stars 13.91k forks source link

coredns delay resolution #611

Open eoli3n opened 3 years ago

eoli3n commented 3 years ago

Hi,

Internal DNS resolution is not working, and as forward is not set, external doesnt work too with a warning.

➜ k logs -f -l k8s-app=kube-dns -n kube-system
.:53
[INFO] plugin/reload: Running configuration MD5 = fbb756dad13bce75afc40db627b38529
CoreDNS-1.7.0
linux/amd64, go1.14.4, f59c03d
[ERROR] plugin/errors: 2 6850798441047692839.4917895967683832202. HINFO: plugin/loop: no next plugin found
.:53
[INFO] plugin/reload: Running configuration MD5 = fbb756dad13bce75afc40db627b38529
CoreDNS-1.7.0
linux/amd64, go1.14.4, f59c03d
[ERROR] plugin/errors: 2 8152072201767744618.3035621431897242144. HINFO: plugin/loop: no next plugin found
infra-kubernetes/ansible on master ! 
➜ k get pods
NAME      READY   STATUS    RESTARTS   AGE
busybox   1/1     Running   0          6s

infra-kubernetes/ansible on master ! 
➜ k exec -ti busybox -- sh
/ # nslookup www.google.fr
Server:    10.32.0.10
^C
/ # nslookup kubernetes
Server:    10.32.0.10
Address 1: 10.32.0.10

When i set

Any help would be appreciated.

eoli3n commented 3 years ago

Strangly ( :) ), fixing my routing tables to reach pods subnets from workers did the trick. See https://github.com/kelseyhightower/kubernetes-the-hard-way/issues/539#issuecomment-716106281

I can now resolve but it is long, between 10 to 30 seconds and sometimes it fails to resolve, i will figure this out

➜ time k exec -ti busybox -- nslookup kubernetes
Server:    10.32.0.10
Address 1: 10.32.0.10 kube-dns.kube-system.svc.cluster.local

Name:      kubernetes
Address 1: 10.32.0.1

________________________________________________________
Executed in   20,82 secs   fish           external 
   usr time  123,06 millis  1124,00 micros  121,93 millis 
   sys time   35,19 millis  374,00 micros   34,81 millis 
eoli3n commented 3 years ago

I solved long delay resolution with this -> https://github.com/kubernetes/kubernetes/issues/21613#issuecomment-343190401

eoli3n commented 3 years ago

It should be added ? Does ubuntu server from GKE load that kernel module defaultly ? https://github.com/kelseyhightower/kubernetes-the-hard-way/issues/561