Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metallb addon is not setting the IP range #10307

Closed
seguidor777 opened this issue Jan 29, 2021 · 4 comments · Fixed by #10395
Closed

Metallb addon is not setting the IP range #10307

seguidor777 opened this issue Jan 29, 2021 · 4 comments · Fixed by #10395
Assignees
Labels
area/addons help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@seguidor777
Copy link

Hi,

I'm trying to use the metallb addon and I'm following this guide about how to install it and configure it.
After I add the first and end IPs (192.168.49.10, 192.168.49.30) and I query the configmap, the addresses list appear empty.
And I have to edit the configmap and add them manually, can you please help me so I can set the values from the minikube addons configure metallb command? I actually have a script that bootstraps minikube with all of its addons and configs

@seguidor777
Copy link
Author

I'm using this patch as a workaround kubectl patch configmap config -n metallb-system -p '{"data":{"config": "address-pools:\n- name: default\n protocol: layer2\n addresses:\n - 192.168.49.10-192.168.49.20"}}'

@sharifelgamal
Copy link
Collaborator

This seems to be a bug in the minikube addons configure metallb command, I can definitely reproduce it locally.

@sharifelgamal sharifelgamal added area/addons kind/bug Categorizes issue or PR as related to a bug. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels Feb 3, 2021
@govargo
Copy link
Contributor

govargo commented Feb 5, 2021

/assign

@tonejito
Copy link

tonejito commented Jan 28, 2022

If it helps anyone, I couldn't configure the addon in a script with this:

echo -e "${METALLB_IP_START}\n${METALLB_IP_END}\n" | \
minikube addons configure metallb --profile ${MINIKUBE_PROFILE} || true

I ended up applying a revised version of the ConfigMap:

METALLB_IP_START=192.168.59.10
METALLB_IP_END=192.168.59.20

minikube addons enable metallb
sleep 10

# Patch MetalLB config with updated IP address range
kubectl apply -f - -n metallb-system << EOF
apiVersion: v1
kind: ConfigMap
metadata:
  name: config
  namespace: metallb-system
data:
  config: |
    address-pools:
    - name: default
      protocol: layer2
      addresses:
      - ${METALLB_IP_START}-${METALLB_IP_END}
EOF

I put a wait command to be sure that the components are deployed correctly with the new configuration:

sleep 5

NAMESPACE=metallb-system
APP=metallb
for COMPONENT in controller speaker
do
  kubectl wait \
    --for condition=ready pod \
    -l app=${APP} -l component=${COMPONENT} \
    -n ${NAMESPACE} \
    --timeout=${TIMEOUT}
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/addons help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants