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
- successInvoked restapi exposed in pod2 using
wget service2ipaddress
- successInvoked restapi exposed in pod2 using
wget service2Name
- failure with messageCould not resolve host: pcgamesapp-service
curl https://www.google.com
- failure with messageCould not resolve host: www.google.com
Executed below
nslookup
command , but receivedconnection timeout error
as shown in below screenshot
Setup
- Initalised k8s cluster (v1.22.9) with 1 masterNode and 1 workerNode on
ubuntu 20.04
usingkubeadm
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
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.