Closed InfernoCraft closed 5 months ago
The two loadbalancers serve a different purpose:
k3s
loadbalancer is the loadbalancer that's used for the control-plane, so you, as an admin can talk to k3sct-k3s-traefik
loadbalancer is the loadbalancer that's used for ingress, so the enduser can visit any website you make available via k3sYou could disable the k3s
loadbalancer by setting this in your kube.tf
:
use_control_plane_lb = false
Does this answer your question?
Hi, sorry for the late response. First of all, the k3s load balancer is the one from traefik, which i manualy added via the values of the traefik install under the annotations. The ct-k3s-traefik load balancer is getting created by the library with the load_balancer_type. The problem is that the load balancer created by the library does not have any services and is not attached to any servers. And so it doesn't serve any purpose exept it wastes money. So I don't know why there is a mandatory load balancer created for nothing, because even if i disable the manual load balancer i added, the load balancer created by the library still isn't doing anything. Maybe it isn't working because I currently only have one control plane node but i don't know.
Thank you for your time and help.
Ah, I misunderstood the problem here.
Interesting. Can you see if:
1- The load-balancer ct-k3s-traefik has any labels attached to them?
2- Is your cluster_name
by any chance ct-k3s
?
If your loadbalancer has the labels provisioner
, engine
and cluster
attached, and no other labels, you could try changing the names to match
...
traefik_values = <<EOT
...
annotations:
"load-balancer.hetzner.cloud/name": "ct-k3s-traefik"
This should make the cluster think it needs to use a loadbalancer with that name, instead of trying to provision one with the k3s
name.
It seems that a loadbalancer for ingresses is always made at current, when your ingress is not set to "none".
I think that setting enable_klipper_metal_lb = "true"
should also disable that loadbalancer. YMMV, I'm an nginx user myself :rofl:
@InfernoCraft Your problem comes from editing the traefik helm value manually, try using the same name for the lb as the one you see created.
@InfernoCraft Your github access token may have leaked, in the above kube.tf, I deleted it, but if is was really the original one, better regenerated it.
Closing for now, as this is just a config issue.
Description
Hi, Is there any way of disabling the load balancer defined in the kube.tf file, because i have a load balancer defined in the traefik helm values and therefore two load balancer are getting created, but only one of them is used. So is there a way not to create a load balancer in the kube.tf file?
Best regards and thank you for replying
Kube.tf file
Screenshots
Platform
Linus