<p>I have a pod with <code>mysql</code> and service to provide access from outside. So I can connect to my database at <code>192.168.1.29:3306</code> from the other machine. </p>

<p>But how I can connect from the other pod in the same cluster (same node)?</p>

<p>That is my service description:</p>

<pre><code>Name:                     etl-mysql
Namespace:                default
Labels:                   run=etl-mysql
Annotations:              field.cattle.io/publicEndpoints=[{"addresses":["192.168.1.20"],"port":31211,"protocol":"TCP","serviceName":"default:etl-mysql","allNodes":true}]
                          kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"labels":{"run":"etl-mysql"},"name":"etl-mysql","namespace":"default"},"spec":{"extern...
Selector:                 run=etl-mysql
Type:                     NodePort
IP:                       10.43.44.58
External IPs:             192.168.1.29
Port:                     etl-mysql-port  3306/TCP
TargetPort:               3306/TCP
NodePort:                 etl-mysql-port  31211/TCP
Endpoints:                10.42.1.87:3306
Session Affinity:         None
External Traffic Policy:  Cluster
Events:                   &lt;none&gt; 
</code></pre>

Berkut
<p>Kubernetes has a built in DNS, that registers services automatically resulting in simple to use DNS address like this: http://{servicename}.{namespace}:{servicePort}</p>

<p>If you are in the same namespace you can omit the namespace part and if your service listens on port 80 that part can be omitted as well.</p>

<p>If you need further informations the following documentation will help you: <a href="https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/" rel="nofollow noreferrer">DNS for Services and Pods</a></p>
