DNS resolution inside LKE kubernetes not working

Linode Staff

For some reason DNS resolution inside my kubernetes is not working: psql.default.svc.cluster.local could not be resolved (3: Host not found). Using a direct IP works.

Checking host from a test pod works: psql.test.pod.cluster.local has address

Endpoints are:

NAME           ENDPOINTS            AGE
kubernetes   2d13h
package-repo       168m
psql        82m

pod -o wide:

NAME                            READY   STATUS    RESTARTS   AGE     IP          NODE                        NOMINATED NODE   READINESS GATES
dnsutils                        1/1     Running   0          20m   lke5178-6252-5fr4cb31ac7f   <none>           <none>
package-repo-67f47d87f7-pjpsb   1/1     Running   0          7m38s   lke5178-6252-5fr4cb31ac7f   <none>           <none>
psql-d99d4868c-c9v57            1/1     Running   0          62m   lke5178-6252-5fr4cb31ac7f   <none>           <none>

All system pods are functional:

NAME                                      READY   STATUS    RESTARTS   AGE
calico-kube-controllers-77587f49b-snow   1/1     Running   6          2d13h
calico-node-55zfs                         1/1     Running   1          2d13h
coredns-6955765f44-2kx49                  1/1     Running   1          2d13h
coredns-6955765f44-6snbn                  1/1     Running   1          2d13h
csi-linode-controller-0                   3/3     Running   3          2d13h
csi-linode-node-5p4j7                     2/2     Running   2          2d13h
kube-proxy-963jp                          1/1     Running   1          2d13h

Really strange. What could be wrong?

1 Reply

We recently had a customer run into this, and here's the solution they found:

Using NGINX, you'll have to use the Kubernete's resolver, and you have to use the Fully Qualified Domain Name (FQDN) to any pods.

Here are the resources they found that helped them:




Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct