Rancher外部子域 [英] Rancher external subdomains

查看:87
本文介绍了Rancher外部子域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在Docker容器中为应用设置子域,而不是在内部牧场者网络中,而是为公众使用。我已将域委托给rancher服务器。而且目录中几乎所有堆栈中都有主机属性,但是它不起作用。我想我需要使用一些rancher dns或设置nginx来委派域,以将流量代理到某些rancher服务器,但是我找不到任何东西。

I need to set subdomains for apps in docker containers, not in internal rancher network but for public use. I have domain delegated to rancher server. And there is host property in almost all stacks from catalog, but it doesn't work. I guess i need to delegate domain using some rancher dns or setup nginx to proxy traffic to some rancher server but I can't find any.

推荐答案

您需要添加一个负载平衡器服务,然后将主机的80/443转发到容器app / nginx /任何内容。

What you need is add a load-balancer service, which then forwards 80/443 of the host to the container app/nginx/whatever.

因此,请导航到堆栈中,单击添加服务->负载均衡器。然后,您可以选择哪个域触发域(或捕获所有域,我现在就这样做),然后选择哪个目标。在此处选择应用程序容器,然后在容器中运行其应用程序/ httpd服务器的端口,基本上就是这样

So navigate to your stack, click on add service -> load balancer. Then you can chose either for wich domain to trigger ( or catch all, which i would do for now ) and then which target. There you select your app-container and the port the container has its app / httpd server running and thats basically it

这篇关于Rancher外部子域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆