简体   繁体   English

Nginx反向代理背后的牧场主

[英]Rancher behind a Nginx Reverse Proxy

I have Rancher running behind this reverse proxy https://github.com/jwilder/nginx-proxy and I can start any containers and workloads I want. 我让Rancher在此反向代理https://github.com/jwilder/nginx-proxy后面运行,我可以启动任何想要的容器和工作负载。 But because it hosts the containers on a managed network the reverse proxy cant get the IP address of the container and wont forward to the application. 但是,由于反向代理将容器托管在托管网络上,因此反向代理无法获取容器的IP地址,也无法转发给应用程序。 I still learning how to use Rancher but from the docs there were a couple of labels that I thought would be useful but never got to try them because it doesnt allow me to add labels on the workload. 我仍在学习如何使用Rancher,但是从文档中我认为有几个标签很有用,但从未尝试过,因为它不允许我在工作负载上添加标签。 Im using rancher 2.1.1 我正在使用rancher 2.1.1

You can add labels and annotations on a workload through the Rancher UI under 'Show Advanced Options', but depending on what you are doing you might want to use the Ingress Controller that rancher can deploy for you to route traffic through services. 您可以通过Rancher UI的“显示高级选项”下的工作负载添加标签和批注,但是根据您正在执行的操作,您可能希望使用rancher可以部署的Ingress Controller来通过服务路由流量。 You dont want to have to route traffic to workloads directly by cluster IP. 您不需要通过群集IP直接将流量路由到工作负载。

https://rancher.com/docs/rancher/v2.x/en/k8s-in-rancher/load-balancers-and-ingress/ingress/ https://kubernetes.io/docs/concepts/services-networking/ingress/ https://rancher.com/docs/rancher/v2.x/en/k8s-in-rancher/load-balancers-and-ingress/ingress/ https://kubernetes.io/docs/concepts/services-networking/入口/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM