Hi!

I'm trying to figure out if I can get the original client IP when using 
kubernetes services/load balancer. 

My test is a docker container running a simple TCP server that returns to the 
client the IP addresses of the socket (written in c, using 
getsockname/getpeername).

On an on-prem cluster, I get results similar to this -

server = 172.30.182.87:5555 client = 10.73.68.170:60155
server = 172.30.195.26:5555 client = 10.73.68.170:25024
server = 172.30.195.26:5555 client = 10.73.68.170:60157
server = 172.30.195.26:5555 client = 10.73.68.170:47226

Which are what I expected - 2 pods and the same IP address for the client (not 
the actual one, but that's a separate issue!).

But when doing the same on an AWS cluster I get the following -
server = 100.96.3.4:5555 client = 172.20.41.6:10397
server = 100.96.3.4:5555 client = 100.96.3.1:55627
server = 100.96.2.3:5555 client = 172.20.49.85:52491
server = 100.96.3.4:5555 client = 172.20.41.6:10403
server = 100.96.3.4:5555 client = 100.96.3.1:55633

What are these client IPs? the 100.x.x.x are the service endpoints, but I don't 
understand where the 172.x.x.x came from. And why do I get different client IPs 
when I run it from the same machine?

Thanks in advance to anyone who can shed some light on this:)
Gail

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to kubernetes-users+unsubscr...@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to