<p>I have a few node.js microservices running in Kubernetes and now I would need to  find a way to communicate between them. I was thinking to expose an endpoint that would only be accessible internally from other pods. I have been searching for hours, but didn't find a solution that would be secure enough. Is there a way to make it work as such? Thank you!</p>

Jani
<p>If you want your service to be accessible only from selected pods - you may use <a href="https://kubernetes.io/docs/concepts/services-networking/network-policies/" rel="nofollow noreferrer">Network Policies</a>. They allow to define what pods can talk to what pods on the network level. For example, you may expose your service through ingress and allow only ingress controller to talk to your application. That way you can be sure that your application can only be available through ingress (with authentication) and no other way.</p>

<p>Network Policies are supported only be some network plugins:</p>

<ul>
<li>Calico</li>
<li>Open vSwitch</li>
<li>Cilium</li>
<li>Weave</li>
<li>Romana</li>
</ul>
