lishaoshu1240 commented on issue #5573: URL: https://github.com/apache/apisix/issues/5573#issuecomment-977806660
> read: https://github.com/apache/apisix/blob/master/docs/zh/latest/admin-api.md#body-%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0-3 first hi,兄弟,这个文档我看了好多遍了,我完全理解admin-api.md 中upstream的意思。但是现在我光看这个文档还是不能明白内置的etcd 怎么用的。 我的order微服务已经注册到apisix 配套的的etcd里面了,现在就是想通过openresty 去服务发现这个order微服务。 所以我现在通过下面步骤来实现: step1、通过http://192.168.0.73:9080/apisix/admin/upstreams/order 新增一个upstream。 { "service_name": "order", "type": "roundrobin", "discovery_type": "etcd" } **现在问题点就在这,我不知道这个新增的upstream怎么写,你上文说不需要discovery_type,如果不需要的话,那么这个body参数怎么写?(只留下service_name 和type,去提交的话,会报错)。** step2、通过http://192.168.0.73:9080/apisix/admin/routes/1 来添加上面的upstream。这一步没问题。 { "methods": ["GET"], "uris": ["/api/order*","/api/calu*"], "plugins": { "jwt-auth": {} }, "upstream_id":"order" } 通过上面两个步骤后,我的理解就是当有order微服务接口过来的时候,apsix能够正常转发到我的order后端地址。但是现在明显卡在第一步。 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
