I noticed when accessing the Kubernetes Service, the host ip is ignored by the kubernetes.
For example: I have 3 kubernetes workers, hostIP1
, hostIP2
and hostIP3
, on each worker, i create a pod, with label: app = test
. In each pod, it just simple runs python -m SimpleHTTPServer 32000
, I then create a service to expose port: 32000
so that it can be accessed outside the cluster.
But when I access http://hostIP1:32000
, the traffic is actually routed to any of the hosts, hostIP1
, hostIP2
and hostIP3
Is there a way to only let Kubernetes forward traffic to hostIP1
when accessing http://hostIP1:32000
?
Thanks