如何将部署在 Rancher k3s 上的应用程序公开到互联网
我在不同的命名空间上有不同的部署,即使我没有可用的静态公共 IP,我也想将其中一些部署公开到 Internet。 不同的服务部署在 Rancher k3s 上,每个可公开访问的服务都有一个在同一命名空间中定义的 Ingress。
我试图关注 Rancher - 如何公开公开我的服务? ,但我并没有真正明白我必须做什么,而且:
- 为什么我们需要定义一个 LoadBalancer?在我看来,k3s(Traefik?)使用的 IngressController 已经创建了一个。如果这是必须的(或者是一个好的方法),那么应该如何准确定义服务?
- 我的环境中没有任何 Rancher UI。因此,有没有办法以声明的方式实现该链接中描述的内容?
- 有没有办法使用 No-IP 或 FreeDNS 等服务作为最终主机名?
I've different deployments over different namespaces and I would like to expose some of them to the Internet, even if I don't have a static and public IP available.
The different services are deployed on Rancher k3s and every service which should be publicly accessible has an Ingress defined in the same namespace.
I was trying to follow Rancher - How to expose my services publicly?, but I didn't really get what I've to do and, moreover:
- Why do we need to define a LoadBalancer? It seems to me that the IngressController used by k3s (Traefik?) already creates one. If this is a must (or a good way to go), how it should the service defined exactly?
- I don't have any Rancher UI in my environment. Therefore, is there a way to achieve what described in that link in a declarative way?
- Is there a way to use services like No-IP or FreeDNS for the final hostname?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我没猜错的话,您已经在准系统/虚拟机节点上手动部署了 Kubernetes,现在您想要在该集群内运行部署。
我希望这有帮助。 Ingress 绝对是一个很难掌握的东西!
If I get it right, you deployed Kubernetes manually on barebone/vms nodes and now you want to reach you deployments running inside that cluster.
I hope this helps. Ingress can definitely be a tough one to grasp!