Cluster information:
Kubernetes version: v1.27.4
Cloud being used: bare-metal
Installation method: kubeadm
Host OS: rocky8
CNI and version: v1.1.1
CRI and version: containerd.io-1.6.22
hello everyone
i updated my k8s from version 1.24 to 1.27
i notice that i can’t resolve the names with .cluster.local anymore.
works:
kubectl exec -it dnsutils -- nslookup tata.titi-dev.svc
Server: xx.xx.xx.xx.
Address: xx.xx.xx.xx#53
Name: tata.titi-dev.svc.cluster.local
Address: xx.xx.xx.xx
Doesn’t work
kubectl exec -it dnsutils -- nslookup tata.titi-dev.svc.cluster.local
Server: xx.xx.xx.xx
Address: xx.xx.xx.xx#53
*** Can't find tata.titi-dev.svc.cluster.local: No answer
is this normal behavior for 1.27 ?
this behavior has appeared since the upgrade.
kubectl -n kube-system get cm coredns -o yaml
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
}
prometheus :9153
forward . /etc/resolv.conf {
prefer_udp
}
cache 30
loop
reload
loadbalance
}
Corefile-backup: |
.:53 {
errors
health {
lameduck 5s
}
ready
kubernetes cluster.local in-addr.arpa ip6.arpa {
pods insecure
fallthrough in-addr.arpa ip6.arpa
}
prometheus :9153
forward . /etc/resolv.conf {
prefer_udp
}
cache 30
loop
reload
loadbalance
}
kind: ConfigMap
metadata:
creationTimestamp: "2021-09-28T19:11:11Z"
name: coredns
namespace: kube-system
resourceVersion: "160908307"
uid: 1cf287e8-6ac7-4b30-98a0-e36462343ad4
whan i add . at the end it works , where is the problem
[root@xxxxxxx ~]# kubectl exec -it dnsutils -- nslookup google.com.
Server: 169.254.20.10
Address: 169.254.20.10#53
Non-authoritative answer:
Name: google.com
Address: 216.58.214.78
[root@xxxxxxx ~]# kubectl exec -it dnsutils -- nslookup google.com
Server: 169.254.20.10
Address: 169.254.20.10#53
*** Can't find google.com: No answer
[root@xxxxxxxxx ~]# kubectl exec -it dnsutils -- nslookup hub.j-hub-dev2.svc.cluster.local
Server: 169.254.20.10
Address: 169.254.20.10#53
*** Can't find hub.j-hub-dev2.svc.cluster.local: No answer
[root@xxxxxxxxxx ~]# kubectl exec -it dnsutils -- nslookup hub.j-hub-dev2.svc.cluster.local.
Server: 169.254.20.10
Address: 169.254.20.10#53
Name: hub.j-hub-dev2.svc.cluster.local
Address: 192.168.40.80
Thank you for your answers