Need help on exposing services

I have a running setup of Rancher with the following configurations:

  • Rancher host runs on a public IP machine (say 11.22.33.44 for example);
  • I have 8 nodes on my 10.1.1.0/24 network (not accessible from the internet);

My goal is to provide a web service with load balancing using Rancher and I have a few questions:

  • Is it risky to serve Rancher’s web interface publicly?
  • How could I serve this web app using a single public IP?

Here are the steps I tried:

1 - Deploy a workload called “web-app” with a scalable deployment of 8 pods using the “rancher/hello-world” image with port mapping as follows:

  • Port Name: http
  • Publish the container port: 80
  • Protocol: TCP
  • As a: NodePort
  • On listening port: Random
    2 - Add Ingress on Load Balancing called “hello” on the same namespace using “Automatically generate a .xip.io hostname” (otherwise I couldn’t manage it to work). Rule as follows:
  • Path: /
  • Target: web-app
  • Port: 80
    3 - Finally, when it starts, it becomes available at hello.gabriel-milan.10.1.1.14.xip.io/, which is not accessible from the Internet.

How could I provide this service publicly?

Hi, Gabriel. I responded to your question yesterday on Stack Overflow. If you have more questions, let’s continue the discussion there.