<p>I have microsevices and SPA app. All of them run on docker with docker compose. I have ocelot api gateway. But gateway knows  ip address or container names of microservices for reaching .  I add a aggregater service inside ocelot app. And I can reach to all services from aggregator service with ips.</p>
<p>But I want to move kubernates. I can scale services. there is no static ip. How can I configure .</p>
<p>I have identity service. This service knows clients ip addresses. Again same problem.</p>
<p>I searched for hours. I found some keywords. Envoy, Ingress, Consul, Ocelot . Can someone explain these things ?</p>

<p>It sounds like your question is related to <a href="https://kubernetes.io/docs/concepts/services-networking/service/#motivation" rel="nofollow noreferrer">Service Discovery</a>.</p>
<p>In Kubernetes, the native way an &quot;API Gateway&quot; is implemented, is by using <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/" rel="nofollow noreferrer">Ingress resources</a> and <a href="https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/" rel="nofollow noreferrer">Ingress Controllers</a>. If you use a cloud provider, they usually have a product for this, or you can use a custom deployed within the cluster.</p>
<p><em>Service Discovery</em> the Kubernetes way, is by referring to <a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="nofollow noreferrer">Service resources</a>, e.g. the Ingress resources maps URLs (in your public API) to services. And your app is deployed as a <a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/" rel="nofollow noreferrer">Deployment resource</a>, and all replicas (instances) is exposed via a Service resource. An app can also send request to other apps, and it should address that request to the Service resource for the other app. The Service resource does load balancing to the replicas of the receiving app.</p>
