<p>I have a kubernetes cluster on bare metal with NodePort Service and 2 HAProxies balances traffic to these nodes.
when I send a request to one of these nodes, it balances traffic to other nodes in cluster. is it possible to change this behavior? I don't want to re-balance traffic.</p>

<p><strong>Update:</strong>
we can use externalTrafficPolicy: Local  </p>

<pre><code>spec:
  selector:
    app: nginx
  type: NodePort
  externalTrafficPolicy: Local
</code></pre>

<p>Nodeport traffic will be intercepted by kube-proxy and then it will redirect the traffic to the node which contains the Pod in a random manner. It's advisable to use Loadbalancer service instead of nodePort. This applies if you are using userspace and iptables modes</p>

<p>You may use <a href="https://kubernetes.io/blog/2018/07/09/ipvs-based-in-cluster-load-balancing-deep-dive/" rel="nofollow noreferrer">IPVS</a> to change the behavior </p>
