Load balancer is displaying the wrong public IP

I’ve setup the AWS instances from a VPC to register with rancher. However when setting up the rancher LB, the public IP showing from “ports” tab is the VPC gateway IP which not possible to use that to use the container service. Does anyone have the same issue or have a solution to this ?

Thanks,

You’ll need to pass the Private IP of the instance to the rancher-agent when you connect to the rancher master,

Here’s what we add into our AWS user-data scripts which should give you an idea,

-e CATTLE_AGENT_IP=curl http://169.254.169.254/latest/meta-data/local-ipv4