Rancher ingress控制器利用Rancher中现有的负载均衡功能,将Kubernetes ingress的内容转换到Rancher的负载均衡器。
ingress controller 功能:
监听Kubernetes服务器事件;
部署负载平衡器,并将其与Ingress中定义的路由规则进行适配;
通过配置Ingress Address 字段来做为负载均衡器的公共接入地址。
设置一个NGINX服务示例
在配置任何ingress之前, 需要在Kubernetes中创建服务. 首先在Kubernetes环境中添加一个服务和复制控制器(Replication Controller)。
这里添加单个的nginx服务到Kubernetes中。
https://rancher.com/docs/rancher/v1.6/zh/kubernetes/ingress/
https://www.bookstack.cn/read/rancher-2.4.4-zh/be884c3ea48a4f4b.md
https://docs.rancher.cn/docs/rancher2/v1.6-migration/load-balancing/_index/
https://kubernetes.io/zh/docs/concepts/services-networking/ingress/
https://cloud.tencent.com/developer/article/1433262
https://rancher.com/docs/rancher/v1.6/zh/faqs/troubleshooting/
https://segmentfault.com/a/1190000016461400
https://www.cnblogs.com/uglyliu/p/11777457.html
https://www.cnblogs.com/minseo/p/12455320.html
编写main.lua ,用于启动并使用该插件,此处我用的是lua-resty-kafka插件
编写Dockerfile,调整镜像将插件导入其中
FROM quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.32.0
MAINTAINER lyy
WORKDIR /etc/nginx/lua
COPY ./lua-resty-kafka-master.zip .
RUN unzip ./lua-resty-kafka-master.zip
&& rm -f ./lua-resty-kafka-master.zip
&& chown www-data:www-data -R ./lua-resty-kafka-master
&& mkdir resty
&& mv lua-resty-kafka-master/lib/resty/kafka resty/
ADD –chown=www-data ./main.lua plugins/kafka/
https://blog.csdn.net/qq_42914720/article/details/114675596
https://blog.csdn.net/qingyafan/article/details/82692509
https://blog.csdn.net/weixin_43855694/article/details/106942537
https://blog.csdn.net/woshiqiuxiaoyan/article/details/107959600
https://www.sohu.com/a/428285694_355140
https://rancher.com/docs/rancher/v2.x/en/k8s-in-rancher/load-balancers-and-ingress/load-balancers/