This is an automated email from the ASF dual-hosted git repository.

spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 750a9cf  docs: faq doc add use the FQDN address (#4003)
750a9cf is described below

commit 750a9cf5e7bb770899b2cc797d21bf75f329b098
Author: Yuelin Zheng <[email protected]>
AuthorDate: Thu Apr 22 09:47:32 2021 +0800

    docs: faq doc add use the FQDN address (#4003)
---
 docs/en/latest/FAQ.md | 28 +++++++++++++++++++++++++++-
 docs/zh/latest/FAQ.md | 26 +++++++++++++++++++++++++-
 2 files changed, 52 insertions(+), 2 deletions(-)

diff --git a/docs/en/latest/FAQ.md b/docs/en/latest/FAQ.md
index 8242cac..9c44159 100644
--- a/docs/en/latest/FAQ.md
+++ b/docs/en/latest/FAQ.md
@@ -392,9 +392,35 @@ HTTP/1.1 200 OK
 ...
 
 # The uri match failed
-curl http://127.0.0.1:9080/12ab -i
+$ curl http://127.0.0.1:9080/12ab -i
 HTTP/1.1 404 Not Found
 ...
 ```
 
 In route, we can achieve more condition matching by combining `uri` with 
`vars` field. For more details of using `vars`, please refer to 
[lua-resty-expr](https://github.com/api7/lua-resty-expr).
+
+## Does the upstream node support configuring the 
[FQDN](https://en.wikipedia.org/wiki/Fully_qualified_domain_name) address
+
+This is supported. Here is an example where the `FQDN` is 
`httpbin.default.svc.cluster.local`:
+
+This is supported. Here is an example where the `FQDN` is 
`httpbin.default.svc.cluster.local` (a Kubernetes Service):
+
+```shell
+curl http://127.0.0.1:9080/apisix/admin/routes/1  -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "uri": "/ip",
+    "upstream": {
+        "type": "roundrobin",
+        "nodes": {
+            "httpbin.default.svc.cluster.local": 1
+        }
+    }
+}'
+```
+
+```shell
+# Test request
+$ curl http://127.0.0.1:9080/ip -i
+HTTP/1.1 200 OK
+...
+```
diff --git a/docs/zh/latest/FAQ.md b/docs/zh/latest/FAQ.md
index 6e1fd54..c32a2d5 100644
--- a/docs/zh/latest/FAQ.md
+++ b/docs/zh/latest/FAQ.md
@@ -393,9 +393,33 @@ HTTP/1.1 200 OK
 ...
 
 # uri 匹配失败
-curl http://127.0.0.1:9080/12ab -i
+$ curl http://127.0.0.1:9080/12ab -i
 HTTP/1.1 404 Not Found
 ...
 ```
 
 在 route 中,我们可以通过 `uri` 结合 `vars` 字段来实现更多的条件匹配,`vars` 的更多使用细节请参考 
[lua-resty-expr](https://github.com/api7/lua-resty-expr)。
+
+## upstream 节点是否支持配置 
[FQDN](https://en.wikipedia.org/wiki/Fully_qualified_domain_name) 地址?
+
+这是支持的,下面是一个 `FQDN` 为 `httpbin.default.svc.cluster.local`(一个 Kubernetes 
Service) 的示例:
+
+```shell
+curl http://127.0.0.1:9080/apisix/admin/routes/1  -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "uri": "/ip",
+    "upstream": {
+        "type": "roundrobin",
+        "nodes": {
+            "httpbin.default.svc.cluster.local": 1
+        }
+    }
+}'
+```
+
+```shell
+# 测试请求
+$ curl http://127.0.0.1:9080/ip -i
+HTTP/1.1 200 OK
+...
+```

Reply via email to