Good guide to setup a Kubernetes cluster with Traefik
Hi all!
I've a background as Linux sysadmin (not much, couple of years) and I'm facing the challenge to setup a Kubernetes cluster.
One of the requirements is to use Traefik.
I'm finding A LOT of how to online but they are all different from each other.
Do you know a good guide to do such things? The K8s cluster is up and running, Traefik is the problem.
I can get it up, access the dashboard, but that's all. I tried to test it using the example application "whoami" and I can see the app in the dashboard but I can access it only by localhost curl on the node where it runs.
So, there are a few ways to configure it. But- I'll run down basic steps.
Ensure traefik's service is running as a Loadbalancer, with an exposed IP, OR, expose it as port 443.
Use metalLB for provisioning static IPs to services.
To setup services with treafik- either run them as ingress, with traefik as the default ingress controller, or, you can use the ingressroute CRDs. For example- here is an IngressRoute for plex.
On your DNS server (Your local network, not K8s), point, plex.yourdomain.com at the IP you provisioned for traefik.
In my network, I pointed *.kube.mydomain.com to the IP of my traefik service/LB.
So, anytime I browser to anything at *.kube.mydomain.com, it automatically sends the request to treaefik. From that point, traefik sends it to the service.
I’m on mobile and can’t find any good articles ATM but, start looking up how to expose an app via traefik ingress. You’ll need to create ingress manifests for your applications you want to expose using traefik. Hopefully that gets you started.