<p>I am running a Kubernetes Cluster on Azure (AKS), in which a couple of microservices are running based on NodeJS.</p>

<p>I want to query some information from one service by another via HTTP. 
If I send the query through the internet by the whole domain, the request needs to pass the Loadbalancer (nginx-ingress). But the cluster is protected by an oauth2 proxy.</p>

<p>Is it possible to send the query inside of the cluster?</p>

<p>Example:</p>

<pre><code>request({ url : 'http://service-name/api' }, (err, response, body) =&gt; {
        if (err) { throw err; }
        res.json(body);
});
</code></pre>

Nico Schuck
<p><a href="https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/</a></p>

<p>If the services are in the same namespace you can use <code>http://servicename:port</code></p>

<p>If they are in different namespaces then you can use FQDN <code>http://servicename.namespace.svc.cluster.local:port</code></p>
