And such a resolution of the service name to IP address is performed by internal service of the Kubernetes,
which is called DNS.
And we could actually verify that quickly.
Let's go to the terminal, for example, here, and that we could still get a list of the ports, get
ports, and now we could take any of the ports and execute the any commands inside of the running container
inside of the port using cube ctrl exec command.
This command is very similar to Docker Exec Command.
Let's now take the name of any port which belongs to K as web to engine deployment.
Let me copy this name.
In your case, names will be completely different and let me clear our terminal here and enter k exec.
Here will be name of the port.
Next will be two dashes.
And afterwards let's type and s look up and things like that.
Let's press enter.
And I got following response.
What does it mean?
Using this command, we tried to resolve engine x name from inside of the container, which belongs
to this port.
And such resolution was successful.
And this IP address which I got from the DNS server when I made request and let's look up in Genesis.
But where does this IP come from?
Let's write K get as we see.
And here I get such IP and notice that this IP is the same as this one.
And that's what I told you.
Now Kubernetes is able to resolve name of the service to corresponding cluster IP.
And that's what we see here.
And we performed resolution inside of the port, which belongs to our deployment and other service.
And of course, I could execute a similarly command in one of the ports.
For example, I could type here, we get this queue or desk and here type HTTP and gen x and this will
actually connect to an index server and retrieve from it root web page.
Let's try it.
And I successfully received a response from one of the engine exports.
And here was again, web page.