https://rancher.com/ logo
Title
p

prehistoric-solstice-99854

10/27/2022, 7:41 PM
I’ve spent the past two days trying to install MetalLB in an RKE 2 cluster. I’ve read blogs, the docs, Stack Overflow questions and nothing really explains how to do it with a pretty straight forward setup. I have a cluster of 3 controllers and 3 workers all on VMs in ESX. I’ve installed Kubernetes 1.21 (max version due to an app requirement) all running on Oralce 8 hosts. I got the cluster up and running, I’ve deployed some test pods without issue (once I fixed the UDP checksum issue), but when I install MetalLB the controller pod is in a crash loop. I feel like I’ve miss configured it, but I don’t know what I did wrong because all the things I’ve read about MetalLB no one walks through installing it on RKE2 and so their situation doesn’t line up with mine. I’ve searched this channel and see MetalLB mentioned several times, so I’m sure it works, but the previous questions weren’t about what I’m seeing. Any help would be appreciated!
Here is the events of the controller pod:
Events:
  Type     Reason          Age                   From               Message
  ----     ------          ----                  ----               -------
  Normal   Scheduled       55m                   default-scheduler  Successfully assigned metallb-system/controller-54b4fd6944-rnjrz to <http://lou1sspkubew3.corp.aperturecvo.com|lou1sspkubew3.corp.aperturecvo.com>
  Normal   Pulling         55m                   kubelet            Pulling image "<http://quay.io/metallb/controller:v0.13.7|quay.io/metallb/controller:v0.13.7>"
  Normal   Pulled          55m                   kubelet            Successfully pulled image "<http://quay.io/metallb/controller:v0.13.7|quay.io/metallb/controller:v0.13.7>" in 1.958823904s
  Warning  Failed          55m                   kubelet            Error: failed to get sandbox container task: no running task found: task 88a7a6f0425e2b3ee86b1961e64ab3c59eb4f08a6303af18518eb87ace467c46 not found: not found
  Warning  Failed          55m                   kubelet            Error: sandbox container "01b77967f047796cd5b5f6c4d065ec1b4dc5b304e35b7a0e2fae01e3fb72597d" is not running
  Normal   Pulled          55m (x2 over 55m)     kubelet            Container image "<http://quay.io/metallb/controller:v0.13.7|quay.io/metallb/controller:v0.13.7>" already present on machine
  Normal   Created         55m (x2 over 55m)     kubelet            Created container controller
  Warning  Failed          55m                   kubelet            Error: sandbox container "cfe98b37c678e34045274a67097cd59a0be8a952bc30d8cd21377e053e4511e3" is not running
  Normal   SandboxChanged  25m (x721 over 55m)   kubelet            Pod sandbox changed, it will be killed and re-created.
  Warning  BackOff         16s (x1290 over 55m)  kubelet            Back-off restarting failed container
On all the articles about installing MetalLB they install a ConfigMap with the network protocol and IP address pool outlined, but from their official documentation I don’t see anything about a ConfigMap so maybe that is where I’ve messed up? I just don’t know.
c

cuddly-restaurant-47972

10/27/2022, 7:58 PM
Yes, that ConfigMap is imperative or the deployment will not do anything.
p

prehistoric-solstice-99854

10/27/2022, 7:59 PM
This is the config map I applied after applying the
metallb-native.yaml
file from their GitHub repo:
apiVersion: v1
kind: ConfigMap
metadata:
  namespace: metallb-system
  name: config
data:
  config: |
    address-pools:
    - name: default
      protocol: layer2
      addresses:
      - 10.0.100.15
      - 10.0.100.18-10.0.100.20
      - 10.0.100.157-10.0.100.162
      - 10.0.100.229-10.0.100.233
That link points to a different kind of file. This one is what I found on tutorials on how to do it.
c

cuddly-restaurant-47972

10/27/2022, 8:01 PM
So you are just doing layer2?
p

prehistoric-solstice-99854

10/27/2022, 8:01 PM
Yes. Our routers don’t support BGP
c

cuddly-restaurant-47972

10/27/2022, 8:01 PM
Well, honestly if you are having issues with the controller pod then that has nothing to do with the configuration of the IP Pool
Do you have a link to the article you used? Did you try just installing with the helm chart?
p

prehistoric-solstice-99854

10/27/2022, 8:04 PM
I followed the official docs using the manifest method.
Once it broke I went looking else where.
I didn’t do the “Preperation” step because I wasn’t sure it applied and there isn’t a
kube-proxy
configmap so I wasn’t sure if RKE2 did it differently.
c

cuddly-restaurant-47972

10/27/2022, 8:05 PM
p

prehistoric-solstice-99854

10/27/2022, 8:06 PM
So how do I “uninstall” a manifest? Just delete all of the pods?
c

cuddly-restaurant-47972

10/27/2022, 8:06 PM
kubectl delete -f /path/to/manifest
p

prehistoric-solstice-99854

10/27/2022, 8:06 PM
Oh great!
Thanks for that tip.
c

cuddly-restaurant-47972

10/27/2022, 8:07 PM
And then if you created the configmap I would delete that too as it will not delete from the above command (or anything else you created manually). One caveot to that would be if you installed it into its own namespace you can just delete the namespace and recreate it and everything will be deleted.
p

prehistoric-solstice-99854

10/27/2022, 8:09 PM
Okay. I’ll trying using that tutorial and come back if I find my self in the same place. Thanks @cuddly-restaurant-47972!
c

cuddly-restaurant-47972

10/27/2022, 8:10 PM
Anytime! Let me know how it goes.
p

prehistoric-solstice-99854

10/27/2022, 9:57 PM
Looks like the latest version of MetalLB doesn’t use ConfigMaps any more. They use CRs, I’m guessing those are custom resources. I’m not sure how to apply that however. Back to documentation hopping to find the answer.
New problems. I see they have a Slack channel. I’ll go bug them. Thanks for the help.