keijack / python-eureka-client

A eureka client written in python. Support registering your python component to Eureka Server, as well as calling remote services by pulling the the Eureka registry.
MIT License
183 stars 43 forks source link

I can't find a way to get the client to register with eureka using the client's hostname #55

Closed nbradac closed 3 years ago

nbradac commented 3 years ago

The client registers with eureka, but eureka always lists the client's IP address instead of the client's hostname. Because of kubernetes and such, the IP address that the client comes up with is always wrong. I specify the instance_host explicitly with the name that the rest of the system needs to use when I create the EurekaClient object, but the IP is always used instead.

nbradac commented 3 years ago

Nevermind... I explicitly setup my instance_id so that it is hostname:appname:port and now it works fine.