K8s部署kong kongc

虚拟机部署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里面加入插件名即可

转载于:https://www.cnblogs.com/bloomingFlower/p/11239629.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值