How to Configuring Traefik Ingress in a Production Environment with K3s

I have observed that during the installation of k3s, Traefik Ingress is deployed with a single replica. I am inquiring about the suitability of running only one replica in a production environment. If this is not recommended, should I consider running Traefik as a DaemonSet instead?

In reference to the information provided in this article (HA traefik ingress - k3s, k3OS, and k3d - Rancher Labs), it is mentioned that Kubernetes continues to route traffic to pods on nodes that may no longer be operational for up to 30 seconds.

I am seeking guidance on the best practices for configuring Traefik in a production environment. Your insights and recommendations would be highly appreciated.

1 Like

Late to the party but I was looking for best practices as well. I can't confirm it's best practice but I'm running 4 replicas within Production with no issue. The one thing you will have to enable is a preStop hook to sleep the Traefik container for a few seconds. Mine sleep for 30s. This is also partially due to me using AWS ALBs to front my Traefik pods. Just make sure you also have a similar hook for any mandatory containers running alongside Traefik such as a service mesh proxy.