Convert Metallb configInline to CRs for Layer 2 Protocol
I need to create k8s cluster very often in my daily job. One reason I switched from Mac to Linux was to get REAL ip address from metallb. I have everything in scripts for creating a kind cluster, installing metallb loadbalancer and ingress controller.
So when I was trying to start a new cluster like I always do today and got below error, it was quite a shock. I need to find a way to fix this quickly. 🌋
1 | Error: execution error at (metallb/templates/deprecated_configInline.yaml:2:4): Starting from v0.13.0 configInline is no longer supported. Please see https://metallb.universe.tf/#backward-compatibility |
I went to their website first. The Backward Compatibility section mentioned they develped a conversion tool to use. It should be quite straight forward, right? 🤗
1 | docker run -v $(pwd):/var/input quay.io/metallb/configmaptocrs -source values.yaml |
😮💨 Apparently the conversion tool does not work for configInline
, and here is a discussion of the exact issue on their Github repo.
All I need is to pass an address pool in layer2 mode. I found the solution not on the L2 configuration page but on the Full example page.
Here is the CR equivelent to my configInline
above.
1 | apiVersion: metallb.io/v1beta1 |
I update my script and pin the chart verion to 0.13.3. I hope I will never have such surprise… 🤞