Unable to access the clusterIP_service or Internet within a pod by using serviceName or domainName

i have 2 pods(pod1,pod2) with 2 services(service1 links pod1, service2 links pod2) in the same namespace.

Within pod1 i performed below testing. i entered into pod1 using kubectl exec ... and

  • Invoked restapi exposed in pod2 using wget pod2ipaddress - success

  • Invoked restapi exposed in pod2 using wget service2ipaddress - success

  • Invoked restapi exposed in pod2 using wget service2Name - failure with message Could not resolve host: pcgamesapp-service

  • curl https://www.google.com - failure with message Could not resolve host: www.google.com

  • Executed below nslookup command , but received connection timeout error as shown in below screenshot
    enter image description here

Setup

  • Initalised k8s cluster (v1.22.9) with 1 masterNode and 1 workerNode on ubuntu 20.04 using kubeadm in AWS EC2 virtual machines
  • weavenet plugin for networking

i tracked the kube-dns logs but the request information of curl serviceName doesnot showup in the kube-dns logs
kubectl logs --namespace=kube-system -l k8s-app=kube-dns

i followed the steps mentioned in dns-debugging-resolution documentation, but i’m not able to figure out a solution

From reading the previous answers i assume that there is some issue with coredns or iptables …etc . But i’m unable to figure out a solution for this issue.
Please help

i received solution for this issue. i have updated the answer in stackoverflow.
Below link contains the answer