Closed andy108369 closed 1 year ago
The config examples for the docs are:
This is a ConfigMap-based config for MetalLB <=0.12
kubespray 2.21.0 brings metallb v0.12.1 by default https://github.com/kubernetes-sigs/kubespray/blob/v2.21.0/roles/download/defaults/main.yml#L1215
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: ConfigMap
metadata:
namespace: metallb-system
name: config
data:
config: |
address-pools:
- name: default
protocol: layer2
addresses:
- 144.217.30.192/28
- 198.50.185.112/28
- 66.70.218.96/28
- 194.28.98.217/32
- 194.28.98.219-194.28.98.222
EOF
This is a CRD-based config for MetalLB >=0.13
cat <<EOF | kubectl apply -f -
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: default
namespace: metallb-system
spec:
addresses:
- 144.217.30.192/28
- 198.50.185.112/28
- 66.70.218.96/28
- 194.28.98.217/32
- 194.28.98.219-194.28.98.222
autoAssign: true
avoidBuggyIPs: false
EOF
Suggested doc has been added to docs.akash.network at the following location:
The docs should be updated => https://docs.akash.network/providers/build-a-cloud-provider/ip-leases-provider-enablement-optional-step/metallb-install
metallb 0.13 uses CRD-based config instead of the ConfigMap-based one, here are the migration steps => https://metallb.universe.tf/configuration/migration_to_crds/
Migration steps
save the old v0.12 configmap-based metallb config to a
config.yaml
fileuse this command to migrate it to v0.13 (CRD-based format) - (
resources.yaml
)This will produce a new config file -
resources.yaml
.apply the new config
remove the old config
Now you can upgrade / use MetalLB v0.13.
Example
old v0.12 metallb configmap-based config
config.yaml
new metallb v0.13 crd-based config
resources.yaml
file