Trying to set up k3s with MetalLB as load balancer, with the goal of providing external access to k3s hosted apps.
I’d also like to use Rancher to admin the k3s cluster.
So, I install k3s with the --no-deploy=servicelb
option, then proceed with Rancher installation as per Rancher docs (using Helm).
Problem is that I can’t get the Rancher UI to show, even after exposing it using `kubectl expose …``
MetalLB as such works just fine, I can expose a test workload using kubectl expose deployment...
and things work as expected. I just cannot get things working with the Rancher UI…
Any pointers to using Rancher with k3s and MetalLB?
1 Like
Any luck? Currently trying to solve this problem as well.
hi,
I used GitHub - haproxytech/kubernetes-ingress: HAProxy Kubernetes Ingress Controller via Helm chart:
$ helm repo add haproxy-ingress https://haproxy-ingress.github.io/charts
$ helm repo update
$ kubectl create namespace ingress-controller
$ helm install haproxy-ingress haproxytech/kubernetes-ingress --namespace ingress-controller --set controller.service.type=LoadBalancer --set controller.ingressClass=haproxy --set ingress.extraAnnotations='haproxy\.org/ingress\.class=haproxy' --set controller.kind=DaemonSet
$ kubectl --namespace ingress-controller get services haproxy-ingress -o wide -w
From my documentation:
… we say, that we take care of any ingress, which has the Annotation “haproxy.orgingress.class=haproxy”. We use it later for Rancher.
After that, https://web.example.com should give you a “404”, instead of “service unavailable”
…
Sou after install Rancher, you need to add:
ingress.extraAnnotations 'haproxy\.org/ingress\.class=haproxy'
I did it while installing …
...
$helm install rancher rancher-stable/rancher --namespace cattle-system --set hostname=rancher.office.ina,proxy="http://fra-corp-proxy.example.com:3128" --set ingress.extraAnnotations 'haproxy\.org/ingress\.class=haproxy'
....
cu denny