<p>I currently have a service that looks like this:</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  name: httpd
spec:
  ports:
    - port: 80
      targetPort: 80
      name: http
      protocol: TCP
    - port: 443
      targetPort: 443
      name: https
      protocol: TCP
  selector:
    app: httpd
  externalIPs:
    - 10.128.0.2  # VM's internal IP
</code></pre>

<p>I can receive traffic fine from the external IP bound to the VM, but all of the requests are received by the HTTP with the source IP <code>10.104.0.1</code>, which is most definitely an internal IP – even when I connect to the VM's external IP from outside the cluster.</p>

<p>How can I get the real source IP for the request without having to set up a load balancer or ingress?</p>

<p>This is not simple to achieve -- because of the way kube-proxy works, your traffic can get forwarded between nodes before it reaches the pod that's backing your Service.</p>

<p>There are some beta annotations that you can use to get around this, specifically <code>service.beta.kubernetes.io/external-traffic: OnlyLocal</code>.</p>

<p>More info in the docs, here: <a href="https://kubernetes.io/docs/tutorials/services/source-ip/#source-ip-for-services-with-typeloadbalancer" rel="nofollow noreferrer">https://kubernetes.io/docs/tutorials/services/source-ip/#source-ip-for-services-with-typeloadbalancer</a></p>

<p>But this does not meet your additional requirement of not requiring a LoadBalancer. Can you expand upon why you don't want to involve a LoadBalancer?</p>
