coredns: Readiness probe failed 8181: connect: connection refused

Hello, my coredns’s version is 1.5.0, I deploy it in the k8s. And I deploy coredns by deployment, its’ yaml has livenessProbe with ReadinessProbe. But the pod’s ReadinessProbe is often failed.

[root@master3 log]# kubectl get pod -nkube-system -owide|grep coredns
coredns-58f78cf5f4-268g6                   0/1     Running   0          2d4h    10.151.164.145   master1   <none>           <none>
coredns-58f78cf5f4-2cfwx                   0/1     Running   0          24h     10.151.208.191   master2   <none>           <none>
coredns-58f78cf5f4-nndv8                   0/1     Running   0          6h32m   10.151.32.112    master3   <none>           <none>

I describe the pod’s event as follows:

Events:
  Type     Reason            Age                     From              Message
  ----     ------            ----                    ----              -------
  Warning  DNSConfigForming  5m25s (x305 over 6h2m)  kubelet, master3  Nameserver limits were exceeded, some nameservers have been omitted, the applied nameserver line is: 172.16.3.1 172.16.3.2 172.16.3.5
  Warning  Unhealthy         59s (x85 over 13m)      kubelet, master3  Readiness probe failed: Get http://10.151.32.112:8181/ready: dial tcp 10.151.32.112:8181: connect: connection refused

I try to connect the pod’s 8181 port by using telnet, but failed.

[root@master1 ~]# telnet  10.151.164.145 8181
Trying 10.151.164.145...
telnet: connect to address 10.151.164.145: Connection refused
[root@master1 ~]# telnet  10.151.164.145 8080
Trying 10.151.164.145...
Connected to 10.151.164.145.
Escape character is '^]'.
^]

my readinessProbe and livenessProbe as follows:

    readinessProbe:
      failureThreshold: 10
      httpGet:
        path: /ready
        port: 8181
        scheme: HTTP
      periodSeconds: 10
      successThreshold: 1
      timeoutSeconds: 5

    livenessProbe:
      failureThreshold: 10
      httpGet:
        path: /health
        port: 8080
        scheme: HTTP
      periodSeconds: 10
      successThreshold: 1
      timeoutSeconds: 5

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (11 by maintainers)

Most upvoted comments

Try upgrading to a more recent version of CoreDNS (like 1.6.2) - I think there is a ready plugin bug in v1.5.0 that causes it to not listen …

#2814 - which looks like a fix related to config reloads - but may contain other fixes (like default listening port?).