Setting Up TCPRoutes and UDPRoutes in K3S with Traefik
Asked by
TechieGamer2023
I've been diving into K3S and Kubernetes, setting it up on a Fedora VM. Currently, I've got Traefik up and running using Helm, following the recent documentation for the Gateway API, which is replacing Ingress. Everything is working smoothlyโI can access the Traefik dashboard through traefik.k3s.local. Now I want to extend my setup to include TCPRoutes and UDPRoutes for a deployment running Syncthing. I've seen that Traefik requires an 'experimentalChannel' setting to support these routes, and I added that to my HelmChartConfig manifest. However, I'm running into errors when I try to create TCPRoute or UDPRoute, stating that the resources can't be found and that the Custom Resource Definitions (CRDs) may not be installed. I've already confirmed that I'm using the right configurations, but I'm not sure how to proceed without messing up my existing Traefik setup. Any suggestions?
Answers
Yeah, just as said, youโll have to manually install the CRDs for TCPRoute and UDPRoute. It's a bit of a hassle, but it's necessary for Traefik to recognize them. You can apply the experimental CRDs from the GitHub releases page linked in the documentation. After that, Traefik should pick them up once theyโre installed.
Reply to this answer
You're facing a classic issue with K3S and Traefik regarding CRDs. It looks like the Traefik chart in K3S has separated the CRDs, and right now, the experimental ones arenโt included by default. You'll need to grab the manifest for the TCPRoute and UDPRoute CRDs separately and install them yourself. Just ensure that you're using the correct versions to match up with your Traefik installation.
Reply to this answer
I had a similar issue. When I applied the manifest for the experimental CRDs using `kubectl apply --server-side`, that did the trick for me. It might not be the cleanest method, but if it works, itโs good enough! Just keep an eye on your CRD versions in case of future updates.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions