apisix-helm-chart icon indicating copy to clipboard operation
apisix-helm-chart copied to clipboard

k8s部署apisix后三方插件使用问题.

Open ccwxl opened this issue 4 years ago • 4 comments

使用官方的镜像部署到k8s后, 开发的三方插件的运行环境

  1. 比如开发的一个go的插件. alpine 镜像中包含go运行的环境没. 这个场景有Example吗?
  2. 自己开发的插件在k8s的环境下怎么放到pod上. 挂载吗? 有做过相关的例子

ccwxl avatar Oct 11 '21 07:10 ccwxl

It should be fine to use a sidecar to share the network namespace. @spacewander WDYT?

tao12345666333 avatar Oct 11 '21 07:10 tao12345666333

Share the network namespace plus share the same /tmp mount point should be enough. As the apisix will communicate with Go runner via unix socket.

spacewander avatar Oct 11 '21 07:10 spacewander

类似于这样listen unix:/dev/shm/hugo.sock; 这个/dev/shm/hugo.sock 是一个共享的文件? 然后三方插件的可以独立启动在一个pod中? 这样官网说的apisix会管理第三方插件的生命周期.还能实现吗? 正式环境推荐这样做吗?

ccwxl avatar Oct 11 '21 08:10 ccwxl

Sorry, I just read it again. No, in the product environment you need to put the Go binary into the image, so APISIX can manage its lifecycle. You can use the official image as a base image.

spacewander avatar Oct 11 '21 08:10 spacewander