<p>I have one question which I couldn't find a clear explaination.</p>
<p>If I have a service :</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: my-app-svc
  namespace: myns
spec:
  type: LoadBalancer
  ports:
    - name: http
      port: 8080
      targetPort: 8282
  selector:
    app: my-app
</code></pre>
<p>As you can see above, I explicitly declared <code>type: LoadBalancer</code>. I understand what it means. I am using AWS EKS. I wonder from traffic perspective, does it mean the incoming http traffic flow is :</p>
<pre><code>Load Balancer --&gt; Node port --&gt; service port(8080) --&gt; Pod port(8282)
</code></pre>
<p>Or:</p>
<pre><code>Load Balancer --&gt; service port(8080) --&gt; Pod port(8282)
</code></pre>
<p>Which one is correct? If neither is correct, what would be the traffic flow in terms of the order in which each k8s component is involved?</p>

user842225
<p><code>Load Balancer --&gt; Node port --&gt; service port(8080) --&gt; Pod port(8282)</code></p>
<p>Your diagram is correct for instance mode:</p>
<blockquote>
<p>Traffic reaching the ALB is routed to NodePort for your service and then proxied to your pods. This is the default traffic mode.</p>
</blockquote>
<p>There is an option of using IP mode where you have AWS LB Controller installed and set <code>alb.ingress.kubernetes.io/target-type: ip</code>:</p>
<blockquote>
<p>Traffic reaching the ALB is directly routed to pods for your service.</p>
</blockquote>
<p>More details can be found <a href="https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html" rel="nofollow noreferrer">here</a>.</p>
