<p>Locally, bare-metal, two separate 'services' successfully talk to each other trough a gRPC connection, a client and a 'backend'. Both are implemented as NestJS apps, using the gRPC transports.</p>
<p>When deployed in kubernetes(minikube) environment I get <code>Error: 14 UNAVAILABLE: No connection established</code> in the client. Backend listens on <code>localhost:50051</code> (port is exposed from k8 service), frontend attempts connection on <code>engine-svc.default.svc.cluster.local:50051</code>, where the first part up until the dot is the service name and I've <code>nslookup</code>'d it to make sure this is the full domain name.</p>
<p>I tried port-forwarding to the gRPC kubernetes service, this 'backend' part of the connection works fine and communication to/from it works. Thus the 'frontend' deployment/pods is the part to fail establishing a connection.</p>
<p>Minikube comes packaged with coreDNS. I've tried debugging it but without success. When the 'frontend' service attempts to connect, the logs from coreDNS are labeled with <code>NOERROR</code> which I've read means the service is found; still it remains unsuccessfull.</p>
<p>What else could be an issue? What am I missing? Any help is greatly appreciated.</p>

fmi21
<p>Solved my problem thanks to <a href="https://stackoverflow.com/a/56053059">this answer</a>. The problem was that the backend was listening on <code>localhost:50051</code> which means local connections only; port-forwarding also counts as one so that's why it worked. Changing the 'listen on' property to <code>0.0.0.0:50051</code> on the backend part solved the issue;</p>
