DNS to acceso to SERVICE and POD

Hello, a query I am wanting to access by DNS to a POD & a SERVICE that I have created:

$ kubectl run dummy-01 --image=nginx

$ kubectl expose pod dummy-01 --port=80 --name=service-01

I understand that the DNS path to access them is like this:

  • Para un “SERVICE”: “SERVICE-NAME + NAMESPACE-NAME + TYPE-COMPONENT + cluster.local”

  • Para un “POD”:
    “IP-POD + NAMESPACE-NAME + TYPE-COMPONENT + cluster.local”

But when I run a CURL I get this:

$ curl http://service-01.default.svc.cluster.local

$ curl http://172-17-0-7.default.pod.cluster.local


How i can test this componentes?

Thank you.

Hello, @maktup
You should perform this inside the Pod.

Hi … perform what into the pod ?

To curl your one of the service or pod.
kubectl run -it --rm --restart=Never --image=nginx test -- curl http://service-01.default.svc.cluster.local