I'm trying to use k3s as a replacement for minikube since there is a bug that spikes the CPU. The machine on which I'm deploying already has a docker-compose set of services bound to 443 and 80. k3s' traefik superceeds that bind and prevents my access to the existing services.
I want to move k3s' traefik to alternative ports. I've tried to stop traefik with sudo k3s server --no-deploy traefik
but get Error: failed to create listener: failed to listen on 127.0.0.1:6444: listen tcp 127.0.0.1:6444: bind: address already in use
You did not stop the k3s service prior to running the sudo k3s server --no-deploy traefik
command. This command simply starts a new server with the embedded traefik disabled. You'll have to stop the instance that was started before.
Using systemd, you'd stop the running instance using sudo systemctl stop k3s
.
If you want to manually control when k3s is started, I'd recommend disabling the k3s service so that it doesn't get started automatically. To do so, run sudo systemctl disable k3s
.
If you want k3s to still automatically start on boot up, edit the file at /etc/systemd/system/k3s.service
and add the --no-deploy traefik
option after the server
command at the bottom of the file.