Home > Software design >  unable to access the clusterIP_service or Internet within a pod by using serviceName or domainName
unable to access the clusterIP_service or Internet within a pod by using serviceName or domainName

Time:04-27

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 enter image description here

Ports opened for Worker node enter image description here

Please let me know if you have any doubts or concerns with the above details. Thank you

CodePudding user response:

Glad to help you ;-). Sometimes we miss sensitive info like this one.

  • Related