What am I doing wrong? Traefik still gets installe...
# k3s
h
What am I doing wrong? Traefik still gets installed:
Copy code
curl -sfL <https://get.k3s.io> | INSTALL_K3S_EXEC="--disable=traefik --tls-san 10.10.230.10" K3S_KUBECONFIG_MODE="644" sudo sh -
b
="--d
instead of
=" --d
?
Hmmm probably not that
h
Yeah, it’s really strange 😄
b
I dunno
`
Copy code
curl -sfL <https://get.k3s.io> | INSTALL_K3S_EXEC="server" sh -s - --disable-traefik
?
Try putting the flags in the back?
Removing Traefik from the already running k3s
```sudo rm -rf /var/lib/rancher/k3s/server/manifests/traefik.yaml
helm uninstall traefik traefik-crd -n kube-system
sudo systemctl restart k3s```
Not from official docs so who knows,
h
I’m getting another error now 😄 I’m a little step further I guess 😄
So, do you wanna laugh?
Copy code
curl -sfL <https://get.k3s.io> | sh -s - server --disable=traefik
This is working 😄
b
There ya go
h
thanks 😄
I migrated my notes from Markdown to Notion, guess something went wrong with the formatting 😞
Did some more debugging 😄, just because I wanna learn what went wrong.
This one is working!
Copy code
curl -sfL <https://get.k3s.io> | INSTALL_K3S_EXEC="server --disable=traefik --tls-san=10.10.230.10" sh -s -
This one is not:
Copy code
curl -sfL <https://get.k3s.io> | INSTALL_K3S_EXEC="--disable=traefik --tls-san 10.10.230.10 --tls-san 10.43.0.1 --tls-san 127.0.0.1 --tls-san ::1" K3S_KUBECONFIG_MODE="644" sudo sh -
INSTALL_K3S_EXEC
is unset in the new
sh
^_^ thats why everything was working “as is”
s
This one is working!
Copy code
curl -sfL <https://get.k3s.io> | INSTALL_K3S_EXEC="server --disable=traefik --tls-san=10.10.230.10" sh -s -
This one is not:
Copy code
curl -sfL <https://get.k3s.io> | INSTALL_K3S_EXEC="--disable=traefik --tls-san 10.10.230.10 --tls-san 10.43.0.1 --tls-san 127.0.0.1 --tls-san ::1" K3S_KUBECONFIG_MODE="644" sudo sh -
In the “not working” version you’re running
sudo
which will not take environment variables from the current user.
h
Thanks Mark, indeed need to run it as root 😄