虚拟机部署kong

登录master集群任意机器检测各节点

kubectl get node
docker images

登录images仓库

docker pull imagesname:version

scp修改过后的yml文件并使用

kubectl apply(or delete    ) -f xxx.yml

如果出现问题查看log

kubectl log --tail 200

下一步部署kongc 准备域名绑定给api网关和kong client 准备redis集群 找插件同事给出sh,
打包镜像 找到kong-console项目 kong-console/src/main/resources/application.properties
使用jerhins打包镜像 在打通了两个仓库地址的.3机器上执行

docker pull/tag/push

得到harbor仓库所需的镜像 下一步找到kongc访问地址 部署四个istio服务 kongc kong-web kong-console gw-lb

源代码本地安装kong

安装openresty 先brew 安装openssl 和 pcre

然后下载openresty源代码 设置

 ./configure \
   --with-cc-opt="-I/usr/local/opt/openssl/include/ -I/usr/local/opt/pcre/include/" \
   --with-ld-opt="-L/usr/local/opt/openssl/lib/ -L/usr/local/opt/pcre/lib/" \
   -j8 \
   --with-pcre-jit \
   --with-http_ssl_module \
   --with-http_realip_module \
   --with-http_stub_status_module \
   --with-http_v2_module
make
sudo make install

安装luarocks 2.4.3需要配置路径为openresty安装目录下 如果使用brew难以设置 使用源码安装指定所有路径

cd luarocks-2.4.1/
./configure --prefix=/usr/local/openresty/luajit \
    --with-lua=/usr/local/openresty/luajit/ \
    --lua-suffix=jit \
    --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1
    --with-lua-lib=/usr/local/openresty/luajit/lib
make build
# 安装需要root权限
sudo make install
以上从源码安装
如果直接包安装之后,也能动态增减插件,实现插件开发
插件部署方式可以使用源码 将其放到kong 自带plugins目录下 并在启动的config里面加入插件名即可
posted on 2019-07-24 17:38  bloomingFlower  阅读(873)  评论(0编辑  收藏  举报