Looking for a tutorial installing loadbalancer

Hallo,
has anyone a linkt to a tutorial or hint how to add an loadbalancer like traefik.
I try to configure the simple hello-world for first test but I m stucking and totally lost
The goal ist to open the page from outside (internet).

Thanks
Ralf

You don’t give much information.

I assume you have:

  • rancher from docker
  • downstream cluster set up via rancher
    → if k3s: The klipper-lb should already be installed, unless you opted out of it.

There should also be a traefik ingress controller, so just create an ingress ressource pointing to your services.

Hallo,
thanks for the answer.
I m using a default rancher 2.7.9 setup but I m failling to expose for example a webserver.
Same host docker + portainer works , the webserver is accesable from the internet.
My hope is to find a step by step tutorial to learn where I m doing something wrong.
Rancher is a great tool but if something isn t working to you ve a big problem as a beginner.
Ralf

I am very happy to help.
There’s many ways to get your goal. Do you want to use Ingress as Loadbalancer or an external one?
One of the smallest or fastes solution (in my opinion) is:
schema external loadbalancer

You can do all this also with Ingress. The deployment should look like: Ingress (Layer 7, set hostname) → Service (this selects the Pods and creates port redirection) → deployment → Pods

I don’t know any step by step tutorial, it depends very much on your situation. Does that help you?

Hallo,
thanks for your answer.
I will test it later this week. For the moment I ve to solve a general problem because usimg docker, portainer and nginx proxy fails too.
I m using a dedicated from hetzner in germany and eveny target system is reachable directly by hostname:portnumber.
Ralf

Hallo,
problem ist solved.
Works fine if you are mapping port 80 and 443 while starting rancher.
I mapped only 8443 to 443 to avoid problems with running apps on the host.
Using nginx proxy works when mapping the ports into the nginx container.
I needed some days to learn how all this works.
Ralf

You should really try to understand what rancher is and how to set up a sane environment.
From your description of your “solution” I assume that you are running non-rancher workloads in the rancher single node docker cluster ( the rancher docker image is more ore less k3d with rancher pre-installed). You should never run anything in this cluster that is not rancher, instead you should create new cluster from rancher ( a “managed” cluster). If you use the the k3s option, then the load balancer and ingress controllers for 80/443 are already set up.

2 Likes

There is a small example with hello world availabe.
My mistake was not to map port 80:80 and 443.443 while starting rancher.
Ralf