apisix 作为流量网关
其本身数据通讯以来etcd
页面配置以来apisix-dashboard
以后是三个docker镜像的启动配置
containerd 脚本
apisix
#!/bin/sh
ctr run --detach --net-host --mount type=bind,src=/home/pi/apisix/apisix/config/conf.yaml,dst=/usr/local/apisix/conf/config.yaml,options=rbind:rw 192.168.0.30:30003/apache/apisix:latest apisix
dashboard
#!/bin/sh
ctr run -d --net-host --env DASHBOARD_LISTEN_IP=0.0.0.0 --env DASHBOARD_LISTEN_PORT=9000 --mount type=bind,src=/home/pi/apisix/apisix-dashboard/config/conf.yaml,dst=/usr/local/apisix-dashboard/conf/conf.yaml,options=rbind:rw 192.168.0.30:30003/apache/apisix-dashboard:latest apisix-dashboard
etcd
#!/bin/sh
ctr run --detach --net-host --env ALLOW_NONE_AUTHENTICATION=yes --env ETCD_ADVERTISE_CLIENT_URLS=http://0.0.0.0:2379 --env ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379 192.168.0.30:30003/bitnami/etcd:latest my-etcd
apisix 和 dashboard都指定了配置文件(十分重要 对接promethus + grafana 也是在这里暴露一个metric作为endpoint)
在promethus.yml添加一个job
scrape_configs:
- job_name: 'apisix'
static_configs:
- targets: ['apisix:9091/metric'] 更改为指定apisix 的endpoint