-
Notifications
You must be signed in to change notification settings - Fork 38.9k
Closed as not planned
Closed as not planned
Copy link
Labels
for: stackoverflowA question that's better suited to stackoverflow.comA question that's better suited to stackoverflow.comstatus: invalidAn issue that we don't feel is validAn issue that we don't feel is valid
Description
I am using Spring Cloud Gateway and CoreDNS in a Kubernetes cluster. Therefore, when making calls between pods within the cluster, I use addresses in the format http://..svc.cluster.local.
In this setup, when the client calls AWS load balancer > pod1 > pod2, I want to retrieve pod1's IP address, but I am getting the client IP instead. How can I fix this?
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
String remoteHostIp = exchange.getRequest().getRemoteAddress().getAddress()
.getHostAddress();
log.info("filter, remoteHostAddress: {}", remoteHostIp);
.....
}Metadata
Metadata
Assignees
Labels
for: stackoverflowA question that's better suited to stackoverflow.comA question that's better suited to stackoverflow.comstatus: invalidAn issue that we don't feel is validAn issue that we don't feel is valid