<p>I've created two services.</p>

<p>myymlservice</p>

<p>mysql-deployment</p>

<p>myymlservice needs the IP address of the load balancer of mysql-deployment (so it can create a connection string to it)</p>

<pre><code> minikube service list

|-------------|----------------------|--------------------------------|
|  NAMESPACE  |         NAME         |              URL               |
|-------------|----------------------|--------------------------------|
| default     | kubernetes           | No node port                   |
| default     | mysql-deployment     | http://192.168.99.100:30928    |
| default     | myymlservice         | http://192.168.99.100:32724    |
|             |                      | http://192.168.99.100:31461    |
| kube-system | kube-dns             | No node port                   |
| kube-system | kubernetes-dashboard | No node port                   |
|-------------|----------------------|--------------------------------|
</code></pre>

<p>..</p>

<pre><code>kubectl describe service mysql-deployment
Name:                     mysql-deployment
Namespace:                default
Labels:                   &lt;none&gt;
Annotations:              kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"name":"mysql-deployment","namespace":"default"},"spec":{"ports":[{"port":1433,"protoc...
Selector:                 app=mysql
Type:                     LoadBalancer
IP:                       10.107.53.255
Port:                     &lt;unset&gt;  1433/TCP
TargetPort:               1433/TCP
NodePort:                 &lt;unset&gt;  30928/TCP
Endpoints:                172.17.0.7:1433
Session Affinity:         None
External Traffic Policy:  Cluster
Events:                   &lt;none&gt;
</code></pre>

<p>How (with yml) does one service (or the containers that support the service) get the IP address ?</p>

<p>More of my setup at the previous question:</p>

<p><a href="https://stackoverflow.com/questions/55935077/single-service-with-multiple-exposed-ports-on-a-pod-with-multiple-containers/55935176">single service with multiple exposed ports on a pod with multiple containers</a></p>

granadaCoder
<p>If you want to build the connection string you can use the service name instead of ip. for instance mysql-deployment.default.svc.cluster.local. That is because kubernetes has a "dns" <a href="https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/" rel="nofollow noreferrer">built-in</a> and <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/#namespaces-and-dns" rel="nofollow noreferrer">dns resolution</a></p>
