educative.io

Curl: (6) Could not resolve host: when I am trying to access http://hellok8s-svc:4567:

curl: (6) Could not resolve host: when I am trying to access http://hellok8s-svc:4567:

Hello @wangyuhong,

This is Nimra Mubashir from Educative. Thank you for reaching out to us.

We have tested the application, and it is running smoothly for us. Kindly try again and reach out to us if the issue still persists.
While you give it another go, kindly make sure that:

  1. The services are running smoothly.
  2. While running the kubectl exec -it command, you have replaced the name of the pod with the one that you have running in your session.
  3. You are executing the command from inside a Pod.
  4. Make sure there’re no typos in the command.

I’m attaching the screenshot of the successful execution of the mentioned command.

We hope Educative has inspired you to further your learning and please drop us a note if you have any other questions or concerns.
Thank you!