0

I'm still experiencing dns and network issues And I'm at a dead point, looking for hints and suggestions

Summing up :

Following the indications found here : https://kubernetes.io/docs/tasks/administer-cluster/dns-debugging-resolution/ I checked if the DNS is working correctly. But got this error :

root@k8s-eu-1-master:~# kubectl exec -ti dnsutils -- cat /etc/resolv.conf
search default.svc.cluster.local svc.cluster.local cluster.local invalid
nameserver 10.96.0.10
options ndots:5

The dns pod is running :

root@k8s-eu-1-master:~# kubectl get pods --namespace=kube-system -l k8s-app=kube-dns
NAME                       READY   STATUS    RESTARTS   AGE
coredns-5dd5756b68-k25bf   1/1     Running   0          11m
coredns-5dd5756b68-z6wpn   1/1     Running   0          11m

The log of Core DNS looks fine:

root@k8s-eu-1-master:~# kubectl logs --namespace=kube-system -l k8s-app=kube-dns
.:53
[INFO] plugin/reload: Running configuration SHA512 = 591cf328cccc12bc490481273e738df59329c62c0b729d94e8b61db9961c2fa5f046dd37f1cf888b953814040d180f52594972691cd6ff41be96639138a43908
CoreDNS-1.10.1
linux/amd64, go1.20, 055b2c3
.:53
[INFO] plugin/reload: Running configuration SHA512 = 591cf328cccc12bc490481273e738df59329c62c0b729d94e8b61db9961c2fa5f046dd37f1cf888b953814040d180f52594972691cd6ff41be96639138a43908
CoreDNS-1.10.1
linux/amd64, go1.20, 055b2c3

The DNS Service is up:

root@k8s-eu-1-master:~# kubectl get svc --namespace=kube-system
NAME       TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)                  AGE
kube-dns   ClusterIP   10.96.0.10   <none>        53/UDP,53/TCP,9153/TCP   57m

The DNS endpoints are exposed :

root@k8s-eu-1-master:~# kubectl get endpoints kube-dns --namespace=kube-system
NAME       ENDPOINTS                                                        AGE
kube-dns   192.168.151.1:53,192.168.151.2:53,192.168.151.1:53 + 3 more...   13m

Core DNS has sufficient permissions :

root@k8s-eu-1-master:~# kubectl describe clusterrole system:coredns -n kube-system
Name:         system:coredns
Labels:       <none>
Annotations:  <none>
PolicyRule:
  Resources                        Non-Resource URLs  Resource Names  Verbs
  ---------                        -----------------  --------------  -----
  endpoints                        []                 []              [list watch]
  namespaces                       []                 []              [list watch]
  pods                             []                 []              [list watch]
  services                         []                 []              [list watch]
  endpointslices.discovery.k8s.io  []                 []              [list watch]

pinging google is fine:

root@k8s-eu-1-master:~# ping google.com
PING google.com (142.250.179.174) 56(84) bytes of data.
64 bytes from ams15s41-in-f14.1e100.net (142.250.179.174): icmp_seq=1 ttl=118 time=8.56 ms
64 bytes from ams15s41-in-f14.1e100.net (142.250.179.174): icmp_seq=2 ttl=118 time=8.66 ms
64 bytes from ams15s41-in-f14.1e100.net (142.250.179.174): icmp_seq=3 ttl=118 time=9.96 ms
64 bytes from ams15s41-in-f14.1e100.net (142.250.179.174): icmp_seq=4 ttl=118 time=19.4 ms
64 bytes from ams15s41-in-f14.1e100.net (142.250.179.174): icmp_seq=5 ttl=118 time=8.34 ms
^C
--- google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4004ms
rtt min/avg/max/mdev = 8.338/10.993/19.441/4.261 ms

Based on these indications : https://kubernetes.io/docs/tasks/administer-cluster/dns-debugging-resolution/#known-issues I added to /etc/systemd/system/kubelet.service.d/10-kubeadm.conf these two lines:

Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/run/systemd/resolve/resolv.conf"
Environment="KUBELET_EXTRA_ARGS=--resolv-conf=dnsmasq"

But the DNS Issue persists. What else can I do?

2
  • Is your cluster hosted or managed?
    – Dion V
    Nov 27 at 18:09
  • @DionV I'm hosting the cluster in a bare-metal cloud . And I will manage it
    – Raphael10
    Nov 27 at 18:21

0

You must log in to answer this question.