0

I have two kubernetes pods running via Docker Desktop like below enter image description here

When My Application goes to resolve https://auth.local.bindumoney.com then I got following error log at CoreDNS

[ERROR] plugin/errors: 2 auth.local.bindumoney.com. A: read udp 10.1.0.51:51309->10.102.180.64:53: i/o timeout
[ERROR] plugin/errors: 2 auth.local.bindumoney.com. AAAA: read udp 10.1.0.51:58234->10.102.180.64:53: i/o timeout

ConfigMap:

# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: v1
data:
  Corefile: |
    .:53 {
        errors
        health {
           lameduck 5s
        }
        ready
        kubernetes cluster.local in-addr.arpa ip6.arpa {
           pods insecure
           fallthrough in-addr.arpa ip6.arpa
           ttl 30
        }
        prometheus :9153
        forward . /etc/resolv.conf {
           max_concurrent 1000
        }
        cache 30
        loop
        reload
        loadbalance
    }
    auth.local.bindumoney.com:53 {
        errors
        cache 30
        forward . 10.102.180.64
    }        
kind: ConfigMap
metadata:
  creationTimestamp: "2021-09-05T16:52:24Z"
  name: coredns
  namespace: kube-system
  resourceVersion: "263"
  uid: 06706694-d5cb-4c1a-ad7e-e37978760660

kube-system :

> kubectl get pod -n kube-system

NAME                                     READY   STATUS    RESTARTS   AGE
coredns-775489c667-g6ps9                 1/1     Running   0          13m
coredns-775489c667-zd7st                 1/1     Running   0          13m
etcd-docker-desktop                      1/1     Running   2          20m
kube-apiserver-docker-desktop            1/1     Running   3          20m
kube-controller-manager-docker-desktop   1/1     Running   2          20m
kube-proxy-tvn6r                         1/1     Running   0          20m
kube-scheduler-docker-desktop            1/1     Running   5          20m

Docker Engine Version : 20.10.8

Kubernetes Version : 1.21.4

I rebuild my cluster several times but it's didn't make it work.

I also found a similar question here (How do I debug this Kubernetes coreDNS error?) but that didn't work as well.

Thanks for any suggestions

Hasanuzzaman
  • 1,822
  • 5
  • 36
  • 54
  • First what I see is indent for the part you added. You should try to move your `auth.local.bindumoney.com` to the right so it's inside `.:53` block. Also remove :53 at the end of dns name. Then restart `coreDNS` pods by `kubectl rollout restart deployment coredns -n kube-system`. Let me know if it changes anything. – moonkotte Sep 08 '21 at 07:05
  • 1
    @moonkotte now get this one ```/etc/coredns/Corefile:20 - Error during parsing: Unknown directive 'auth.local.bindumoney.com' ``` But this doc say something different from you ```https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/ ``` – Hasanuzzaman Sep 08 '21 at 17:11
  • Yes, indeed your're right. Let me think what else can be incorrect. – moonkotte Sep 09 '21 at 06:01
  • So I investigated this and it looks like `CoreDNS` actually works as it should, you can see that your request was forwarded `read udp 10.1.0.51:51309->10.102.180.64:53` and looks like there's an issue with your `identity service`. Please run this `kubectl run dnsutils -it --rm --image=gcr.io/kubernetes-e2e-test-images/dnsutils:1.3 --leave-stdin-open -- nslookup auth.local.bindumoney.com` to see if your service actually can respond back. – moonkotte Sep 09 '21 at 14:45
  • @WytrzymałyWiktor no. I solved my problem different way. – Hasanuzzaman Sep 14 '21 at 10:38
  • @WytrzymałyWiktor I did not solve CoreDNS problem. I just use service name instate of my domain every places. But it will be much better I can use this domain. – Hasanuzzaman Sep 14 '21 at 12:56
  • @Hasanuzzaman why do you think it's CoreDNS issue? Have you tested a command above? Does your identity service respond back? – moonkotte Sep 15 '21 at 11:47

0 Answers0