You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OS (cmd: uname -a): centos 7 Linux localhost.localdomain 3.10.0-1160.el7.x86_64 change: added doc of how to load plugin. #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
OpenResty / Nginx version (cmd: nginx -V or openresty -V):openresty/1.19.9.1
etcd version, if have (cmd: run curl http://127.0.0.1:9090/v1/server_info to get the info from server-info API):3.5.0
Issue description
服务发现使用为DNS后,添加路由时,服务名称一定要带端口号吗,测试发现不带端口都被转发到80端口上去了
config.yaml:
discovery:
dns:
servers:
- "127.0.0.1:8600" # use the real address of your dns server
curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
{
"uri": "/gatewayd/",
"upstream": {
"service_name": "gateway.service.consul"
"type": "roundrobin",
"discovery_type": "dns"
},
"plugins": {
"proxy-rewrite" : {
"regex_uri": ["^/gatewayd/(.)", "/${1}"]
}
}
}'
而实际环境中一个服务对应多个节点,端口都是随机不一致的
不能自动获取consul 上注册上去的端口么
Environment
apisix version): 2.9uname -a): centos 7 Linux localhost.localdomain 3.10.0-1160.el7.x86_64 change: added doc of how to load plugin. #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linuxnginx -Voropenresty -V):openresty/1.19.9.1curl http://127.0.0.1:9090/v1/server_infoto get the info from server-info API):3.5.0