apisix icon indicating copy to clipboard operation
apisix copied to clipboard

help request: apisix without etcd using ingress controller

Open beeant0512 opened this issue 1 year ago • 7 comments

Description

按照官方文档,APISIX Ingress Controller:一种无需 etcd 的轻量级部署方式,在k8s上还是部署失败了,因为apisix的config好像还是需要有etcd服务,请问有人部署成功过吗?

Environment

  • APISIX version (run apisix version):
  • Operating system (run uname -a):
  • OpenResty / Nginx version (run openresty -V or nginx -V):
  • etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info):
  • APISIX Dashboard version, if relevant:
  • Plugin runner version, for issues related to plugin runners:
  • LuaRocks version, for installation issues (run luarocks --version):

beeant0512 avatar Jan 18 '24 04:01 beeant0512

按说明是在内部模拟 etcd的, 模拟 etcd server API:根据 CRD 构建 KV 内存数据库,并模拟 etcd server API 提供给 APISIX 进行使用。APISIX 将会尝试 watch Controller 提供的资源配置,并通知到 APISIX 实例。

你部署 失败的现象是什么样的?

hanqingwu avatar Jan 18 '24 04:01 hanqingwu

按说明是在内部模拟 etcd的, 模拟 etcd server API:根据 CRD 构建 KV 内存数据库,并模拟 etcd server API 提供给 APISIX 进行使用。APISIX 将会尝试 watch Controller 提供的资源配置,并通知到 APISIX 实例。

你部署 失败的现象是什么样的?

用的https://github.com/apache/apisix-helm-chart.git 提供的charts,把配置etcd改成了false,然后apisix启动报无法连接 localhost:2379


# -- Ingress controller configuration
ingress-controller:
  enabled: true
......

etcd:
  # -- install etcd(v3) by default, set false if do not want to install etcd(v3) together
  enabled: false

beeant0512 avatar Jan 18 '24 04:01 beeant0512

@hanqingwu

beeant0512 avatar Jan 18 '24 04:01 beeant0512

从 apisix-helm-chart/charts/apisix-ingress-controller/templates/deployment.yaml 来看 config.etcdserver.enabled 为true , 才会连接启动内置的etcd 12379 建议你还是用 enabled 为true 试下

hanqingwu avatar Jan 18 '24 06:01 hanqingwu

enabled为true还是用会部署etcd,和初衷违背了

beeant0512 avatar Jan 22 '24 00:01 beeant0512

按手册的说明,如果你要部署 apisix-ingress-controller 且不使用 etcd 的话 , https://github.com/apache/apisix-helm-chart/tree/master/charts/apisix-ingress-controller helm install ... --set config.etcdserver.enabled=true

hanqingwu avatar Jan 22 '24 03:01 hanqingwu

please use english in the public channel, thanks.

shreemaan-abhishek avatar Jan 23 '24 03:01 shreemaan-abhishek

请问解决了吗? @beeant0512

damoshushu avatar May 24 '24 04:05 damoshushu