DNS resolution is not working in k8 pods after k8 version upgraded to v1.25

We have upgraded our kubernates version from v1.24 to v1.25. We have used kubespray (version v1.2.21) for cluster creation. Cluster is upgraded successfully to v1.25. But once we deploy pods, not able to connect to outside networks like google.com from kubernates pods. It is throwing below error.

k8sadmin@vm-util-mtm-wes-k8-upgrade-rnd:~$ kubectl exec -i -t dnsutils – nslookup google.com
Server: 169.254.25.10
Address: 169.254.25.10#53

** server can’t find google.com.reddog.microsoft.com: SERVFAIL

command terminated with exit code 1

We have tried steps mentioned in this link : Debugging DNS Resolution | Kubernetes, but issue still persist. Any suggestion?

Cluster information:

Kubernetes version: v1.25
Cloud being used: (put bare-metal if not on a public cloud) : Azure VMs
Installation method: using kubespray
Host OS: ubuntu 20.04 LTS
CNI and version: Weave , v2.8.1
CRI and version: docker, v20.10

You can format your yaml by highlighting it and pressing Ctrl-Shift-C, it will make your output easier to read.

Hi @sheldon-cooper26 we are also facing issue while connecting to internet from inside the pod

K8s :- V1.26.1
OS : - RHEL 8.7
VM is hosted using Azure cloud provider.

Core dns logs :-
CoreDNS-1.9.3
linux/amd64, go1.18.2, 45b0a11
[ERROR] plugin/errors: 2 2568389657905608835.8295431261288812352. HINFO: read udp 192.168.54.66:34391->168.63.129.16:53: read: no route to host
[ERROR] plugin/errors: 2 2568389657905608835.8295431261288812352. HINFO: read udp 192.168.54.66:34275->168.63.129.16:53: read: no route to host
[ERROR] plugin/errors: 2 2568389657905608835.8295431261288812352. HINFO: read udp 192.168.54.66:59435->168.63.129.16:53: read: no route to host

Unable to reach internet from inside the pod. nslookup fails with below error
image