GKE single inbound and outbound ip address

We have GKE cluster which communicates with sensors in private network. The communication is very restricted and we need single ip address for outbound and inbound traffic.

We have found out that GKE uses the same Ip address when responding to messages from sensor. This is precisely what we need. The problem is when we try to initiate communication with the sensor from GKE. In this case GKE uses random IP (probably node ip) instead of public ip assigned to load balancer.

Obvious solution is to use NAT. But NAT does not allow inbound traffic without established connection. Which we need.

We tried to use same IP address for NAT and load balancer but that is not allowed.

Is there a way to use same IP address for outbound and inbound traffic when both ends need to established connection?


Solution 1:

According to our google partner this use case is currently not supported by google cloud.

We used simple VM instead of GKE as workaround.