java - How to make Spring Cloud Consul register with external IP? -
how make spring cloud consul register external ip?
i run spring boot applications spring cloud consul in docker. application running inside docker network on docker swarm.
this means if spring consul registers hostname or ip address hostname or ip address internal docker swarm. consul server outside docker swarm.
you can set spring.cloud.consul.discovery.ipaddress
externally , set property spring.cloud.consul.discovery.preferipaddress=true
.
alternatively, can control network interfaces derive ip address from.
in brixton can ignore interfaces:
spring: cloud: inetutils: ignoredinterfaces: - docker0 - veth.*
in camden (currently rc1) can whitelist networks:
spring: cloud: inetutils: preferrednetworks: - 192.168 - 10.0
Comments
Post a Comment