nic-chen commented on a change in pull request #1917: URL: https://github.com/apache/apisix/pull/1917#discussion_r506529675
########## File path: doc/zh-cn/discovery-nacos.md ########## @@ -0,0 +1,71 @@ +<!-- +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +--> + +#### 支持在apisix中使用nacos注册中心 + 1. 参考官方euruka.lua实现 + 2. 未对注册到nacos的实例做健康判断 + 3. 只支持指定的namespace与group + 4. 支持在nacos中配置元数据从而不注册到的apisix + +---- + + +#### 如何使用nacos提供服务发现功能 + +[1] 在 `conf/config.yaml` 文件中增加如下配置,以选择注册中心的类型: + +```yaml +apisix: + discovery: nacos +``` + +[2] 在 `conf/config.yaml` 增加如下格式的配置: + +```yaml +nacos: + host: + - "http://nacos:[email protected]:8848" //用户名和密码使用冒号分隔 + prefix: "/nacos/" + namespace: public //默认命名空间 + group: DEFAULT_GROUP //默认分组 + fetch_interval: 30 + weight: 100 + timeout: + connect: 2000 + send: 2000 + read: 5000 + Review comment: Could you give an example of configuring a specific service, please? Including `route` and `upstream` config. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
