Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Disable Traefik LoadBalancer in K3s #11521

Open
vkoori opened this issue Jan 6, 2025 · 6 comments
Open

Unable to Disable Traefik LoadBalancer in K3s #11521

vkoori opened this issue Jan 6, 2025 · 6 comments

Comments

@vkoori
Copy link

vkoori commented Jan 6, 2025

I am attempting to disable the Traefik load balancer when starting my K3s server, but the Traefik service is still being created as a LoadBalancer type. I used the following command to start K3s with the required flags:

ExecStart=/usr/local/bin/k3s \
    server \
    --disable=traefik \
    --disable=servicelb \
    --disable=local-storage \
    '--write-kubeconfig-mode' \
    '644'

However, after starting K3s, I can still see the Traefik service running as a LoadBalancer in the kube-system namespace when I query the services with kubectl get service -n kube-system.

Output:

$ kubectl get service -n kube-system
NAME             TYPE           CLUSTER-IP      EXTERNAL-IP     PORT(S)                      AGE
kube-dns         ClusterIP      10.43.0.10      <none>          53/UDP,53/TCP,9153/TCP       101m
metrics-server   ClusterIP      10.43.89.231    <none>          443/TCP                      2d1h
traefik          LoadBalancer   10.43.139.147   192.168.10.10   80:30639/TCP,443:30764/TCP   15h

Expected Behavior:
I expect the Traefik load balancer to be completely disabled and not be present as a LoadBalancer service in the kube-system namespace.

@brandond
Copy link
Member

brandond commented Jan 6, 2025

Can you show the output of kubectl get node -o yaml | grep node-args and kubectl get pod -A -o wide?

@vkoori
Copy link
Author

vkoori commented Jan 7, 2025

Thanks for your response!

$ kubectl get node -o yaml | grep node-args
      k3s.io/node-args: '["server","--disable","traefik","--disable","servicelb","--disable","local-storage","--write-kubeconfig-mode","644"]'
$ kubectl get pod -A -o wide
NAMESPACE     NAME                               READY   STATUS    RESTARTS        AGE   IP           NODE     NOMINATED NODE   READINESS GATES
kong          kong-controller-6845694c68-gplbq   1/1     Running   17 (120m ago)   39h   10.42.0.68   kooriv   <none>           <none>
kong          kong-gateway-685b68bc4c-k44j8      1/1     Running   1 (120m ago)    21h   10.42.0.65   kooriv   <none>           <none>
kube-system   coredns-ccb96694c-h9j4b            1/1     Running   1 (120m ago)    20h   10.42.0.66   kooriv   <none>           <none>
kube-system   metrics-server-5985cbc9d7-njgkq    1/1     Running   1 (120m ago)    20h   10.42.0.67   kooriv   <none>           <none>

However, my issue isn't related to the node args or any pods. The problem I'm facing is specifically with the LoadBalancer service for Traefik that persists even after starting K3s with the --disable=traefik and --disable=servicelb flags.

@brandond
Copy link
Member

brandond commented Jan 7, 2025

The service should go away when traefik is disabled and the chart uninstalled. I've never seen it leave anything behind. I don't see an uninstall job pod present - did it succeed, or did you delete anything manually?

@vkoori
Copy link
Author

vkoori commented Jan 9, 2025

nope. I dont delete anything manually

@caroline-suse-rancher caroline-suse-rancher moved this from New to In Triage in K3s Development Jan 13, 2025
@luo3house
Copy link

The docs indicates --disable=traefik, but I turned to --disable traefik then it worked.

@brandond
Copy link
Member

brandond commented Feb 7, 2025

The flag parser should handle either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Triage
Development

No branches or pull requests

3 participants