我在与“localhost”不同的主机上部署了一个领事代理,但领事继续检查 127.0.0.1 上的运行状况。
服务的配置和它的边车:
service {
name = "counting"
id = "counting-1"
port = 9005
address = "169.254.1.1"
connect {
sidecar_service {
proxy {
config {
bind_address = "169.254.1.1"
bind_port = 21002
tcp_check_address = "169.254.1.1"
local_service_address = "localhost:9005"
}
}
}
}
check {
id = "counting-check"
http = "http://169.254.1.1:9005/health"
method = "GET"
interval = "10s"
timeout = "1s"
}
}
使用以下命令部署代理:
consul connect proxy -sidecar-for counting-1 > counting-proxy.log
如何将健康检查更改为 169.254.1.1?