<p>I want to create a cluster of RESTful web APIs in AWS EKS and be able to access them through a single IP (allowing kubernetes to load balance requests to each). I have followed the procedure explained the this <a href="https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types" rel="nofollow noreferrer">link</a> and have set up an example <code>nginx</code> deployment as shown in the following image:</p>
<p><a href="https://i.stack.imgur.com/tPQgu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tPQgu.png" alt="enter image description here" /></a></p>
<p>The problem is that when I access the example <code>nginx</code> deployment via <code>172.31.22.183</code> it works just fine, but when I try to use the cluster IP <code>10.100.145.181</code> it does not yield any response in such a way that it seems to be unreachable.</p>
<p>What's the purpose of that cluster ip then and how can I use it to achieve what I need?</p>

Arnold Zahrneinder
<blockquote>
<p>What's the purpose of that cluster ip then and how can I use it to
achieve what I need?</p>
</blockquote>
<p><code>ClusterIP</code> is local IP that is used internally in the cluster, you can use it to access the application.</p>
<p>While i think Endpoint IP that you got, is might be external and you can access the application outside.</p>
<blockquote>
<p>AWS EKS and be able to access them through a single IP (allowing
kubernetes to load balance requests to each)</p>
</blockquote>
<p>For this best practice is to use the ingress, API gateway or service mesh.</p>
<p>Ingress is single point where all your request will be coming inside it will be load balancing and forwarding the traffic internally inside the cluster.</p>
<p>Consider ingress is like Loadbalancer single point to come inside the cluster.</p>
<p><strong>Ingress</strong> : <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/services-networking/ingress/</a></p>
<p>AWS Example : <a href="https://aws.amazon.com/blogs/opensource/network-load-balancer-nginx-ingress-controller-eks/" rel="nofollow noreferrer">https://aws.amazon.com/blogs/opensource/network-load-balancer-nginx-ingress-controller-eks/</a></p>
