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.
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: plex
namespace: media
spec:
entryPoints:
- websecure
routes:
- match: Host(`plex.xtremeownage.com`)
kind: Rule
services:
- name: plex
port: 32400
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.
That, should get you started.