Closed manuelautomatisch closed 1 year ago
Nevermind, I've changed my mind and switched the whole setup to kube-vip only according to #127.
Works pretty well, if someone else is facing this metallb issue I would recommend to switch to kube-vip only as well.
When executing the ansible playbook the k3s post task "Apply metalllb CRs" fails after 5 retries. The following failure occurs in the playbook:
fatal: [192.168.0.60]: FAILED! => {"attempts": 5, "changed": false, "cmd": ["k3s", "kubectl", "apply", "-f", "/tmp/k3s/metallb-crs.yaml", "--timeout=120s"], "delta": "0:00:20.251025", "end": "2023-05-20 11:13:36.014333", "msg": "non-zero return code", "rc": 1, "start": "2023-05-20 11:13:15.763308", "stderr": "Error from server (InternalError): error when creating \"/tmp/k3s/metallb-crs.yaml\": Internal error occurred: failed calling webhook \"ipaddresspoolvalidationwebhook.metallb.io\": failed to call webhook: Post \"https://webhook-service.metallb-system.svc:443/validate-metallb-io-v1beta1-ipaddresspool?timeout=10s\": context deadline exceeded\nError from server (InternalError): error when creating \"/tmp/k3s/metallb-crs.yaml\": Internal error occurred: failed calling webhook \"l2advertisementvalidationwebhook.metallb.io\": failed to call webhook: Post \"https://webhook-service.metallb-system.svc:443/validate-metallb-io-v1beta1-l2advertisement?timeout=10s\": context deadline exceeded", "stderr_lines": ["Error from server (InternalError): error when creating \"/tmp/k3s/metallb-crs.yaml\": Internal error occurred: failed calling webhook \"ipaddresspoolvalidationwebhook.metallb.io\": failed to call webhook: Post \"https://webhook-service.metallb-system.svc:443/validate-metallb-io-v1beta1-ipaddresspool?timeout=10s\": context deadline exceeded", "Error from server (InternalError): error when creating \"/tmp/k3s/metallb-crs.yaml\": Internal error occurred: failed calling webhook \"l2advertisementvalidationwebhook.metallb.io\": failed to call webhook: Post \"https://webhook-service.metallb-system.svc:443/validate-metallb-io-v1beta1-l2advertisement?timeout=10s\": context deadline exceeded"], "stdout": "", "stdout_lines": []}
When I try to apply the metallb IPAdressPool and the L2Advertisement on the first master (192.168.0.60) manually the following error occurs:
kubectl apply -f metallb-crs.yaml
Error from server (InternalError): error when creating "metallb-crs.yaml": Internal error occurred: failed calling webhook "ipaddresspoolvalidationwebhook.metallb.io": failed to call webhook: Post "https://webhook-service.metallb-system.svc:443/validate-metallb-io-v1beta1-ipaddresspool?timeout=10s": context deadline exceeded Error from server (InternalError): error when creating "metallb-crs.yaml": Internal error occurred: failed calling webhook "l2advertisementvalidationwebhook.metallb.io": failed to call webhook: Post "https://webhook-service.metallb-system.svc:443/validate-metallb-io-v1beta1-l2advertisement?timeout=10s": context deadline exceeded
The same error is also referenced in #245, which ended up in using kube-vip only instead of the combination with metallb.
Expected Behavior
The ansible playbook should be able to apply the IPAdressPool and the L2Advertisement to properly run metallb in the cluster.
Current Behavior
The ansible playbooks fails at task k3s/post: Apply metallb CRs due to a webhook problem.
Steps to Reproduce
Context (variables)
Operating system: Almalinux9 virtualized on proxmox 7.4
Variables Used
all.yml
Hosts
host.ini
Possible Solution
A few users recommended to use kube-vip only as loadBalancer, but I would prefer to run it with metallb.