This message was deleted.
# k3s
a
This message was deleted.
n
Hi! I recently went through exactly this process to learn k3s and try out the new Traefik 3 implementation of Gateway API instead of classic Kubernetes Ingress. I ended up uninstalling k3s, then reinstalling it with the
--disable=traefik
flag passed to the installer (I used this Ansible role but it's all running the same script in the end). Then install Traefik 3 with Helm, the current version 31.0.0 of the Helm chart installs Traefik 3 by default now.
b
hi @numerous-midnight-16903, thank you! I also went the route of installing k3s without traefik as it seemed rather bothersome to try to configure traefik's upgrade from 2 to 3.
Thank you!
🍻 1
n
No worries, let me know if you have any questions! I ended up inadvertently documenting my experience while asking for help so maybe some of these steps will help you https://community.traefik.io/t/unable-to-create-working-httproute-with-traefik-3-1-0-on-k3s/24013
b
i most likely will, but at the moment I am having other issues that needs resolving. who said this was easy? haha
😅 1
💯 1
c
f
FWIW, we went through a migration from traefik to nginx. In our dev cluster, we're running a single controller, so we just went into the SystemD service and added
--disable=traefik
, restarted k3s, and it removed traefik.
If you're running a multi-node control plane, it may not be as graceful, but it was overall pretty smooth to disable the built-in controller.
That said - I think what @creamy-pencil-82913 said might actually be a better option for you -- customize the version.
If you ever need to tweak k3s / k3s-agent launch parameters, you can see them in most installs via
systemctl cat k3s
or
systemctl cat k3s-agent
c
putting config in a config file is a better choice though, as it doesn’t get mangled by the install script if you re-run it.
f
This is true; Speaking of which... If I want to move options into a config file, do I just setup a config file in a well-known place, and remove the options from the systemd unit?
i'm struggling to find a reference for the k3s config file options -- I see some examples, and I see server/agent reference docs for CLI flags and environment variables, but no reference for the config file
f
Yeah, that's a good example, but I couldn't find "how do I disable traefik via the config file?"
Or rather, all the knobs I can tune in a config file
c
the config file maps directly to CLI args. As that page says:
CLI arguments map to their respective YAML key, with repeatable CLI arguments being represented as YAML lists. Boolean flags are represented as
true
or
false
in the YAML file.
So, you can look at the server and agent CLI flag pages (https://docs.k3s.io/cli/server) or just
k3s server --help
there is also https://docs.k3s.io/installation/packaged-components#using-the---disable-flag that specifically covers disabling packaged components
f
Oh I see now. 🤦 I was wondering how you handled lists, but it's just specifying the option multiple times