A
A
Aleks3052018-05-28 23:54:44
Kubernetes
Aleks305, 2018-05-28 23:54:44

Kubernetes how to transfer real ip clients to pods?

Good afternoon.
There is a cluster of 3 nodes deployed using kubespray on real hardware (Bare metal). As a network driver/service - flannel. I make a service through NodePort, open access to internal containers. I check the traffic - all traffic comes from ip 10.233.64.0, that is, NAT and source and destination ip occur when accessing the service.
Can someone tell me if it is possible to somehow get real ips of clients that connect from the Internet to the service on the pods in network packets, that is, so that NAT source ip is not done in incoming packets.
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daniil Martynchuk, 2018-05-29
@Daniilmar

Setting the service.spec.externalTrafficPolicy property to Local for a NodePort service will force the request to be proxyed to the local node only and prevent NAT.
Read more: https://kubernetes.io/docs/tutorials/services/sour...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question