Report this

What is the reason for this report?

Cannot make Pod to Service/Pod call in Kubernetes

Posted on December 30, 2020

I already set up an Kuberentes Service example-service (“example” is a substitution of the real name of my website), and then use an Ingress and the Cert Manager to expose it to the internet. If I visit https://example.com it’s working perfectly. So the example-service should be already working fine.

And then I try to make some Pod to Service calls in order to allow us to do microservices in the following days.

So I connect to a shell in a Pod in the same namespace and run wget http://example-service.default.svc.cluster.local, but it will always timeout.

I also tried to call Pod directly instead of the Service: wget http://example-pod-0x9012j.default.svc.cluster.local times out too.

I also tried wget http://non-exist-service.default.svc.cluster.local and it returns “Name or service not known” error immediately, so it seems the DNS lookup in the previous command is working.

I go back to Minikube and try the same thing out and it works. Is there any extra work to make Pod to Service/Pod working in DigitalOcean Kubernetes?

Thanks in advance.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Just out of curiosity, do either of these two commands work:

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.