JamesTurland / JimsGarage

Homelab Goodies
1.41k stars 344 forks source link

Error with metal lb on RKE script #76

Open AmadorSV opened 2 months ago

AmadorSV commented 2 months ago

I'm getting the next error when I run the rke script:

Error from server (InternalError): error when creating "ipAddressPool.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": endpoints "webhook-service" not found Error from server (InternalError): error when creating "https://raw.githubusercontent.com/JamesTurland/JimsGarage/main/Kubernetes/RKE2/l2Advertisement.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": endpoints "webhook-service" not found

Any Idea?

AmadorSV commented 2 months ago

After runnning the script again it worked but I had to uninstall and re-install rancher. Reinstalling rancher and running other commands the I'm getting the next error: ubectl -n cattgle-system get pods Error from server: etcdserver: request timed out

With kubectl get nodes I get : The connection to the server 192.168.0.190:6443 was refused - did you specify the right host or port?

bsmithuk commented 1 week ago

I equally had this error and decided to chance it and re-run the script (without rolling back the nodes) and the error appears to have gone now.

From reading through the logs, the error seems to stem around steps: Error 1: # Wait for metallb deployment pods to be alive before deploying metallb manifests and Error 2: # Apply L2 Advertisement for metallb

Errors received: TASK [apply-manifests : Wait for metallb pods to be ready, otherwise we cannot start metallb deployment] skipping: [server2] skipping: [server3] fatal: [server1]: FAILED! => {"changed": true, "cmd": ["kubectl", "wait", "--namespace", "metallb-system", "--for=condition=ready", "pod", "--selector=component=controller", "--timeout=1800s"], "delta": "0:00:00.246493", "end": "2024-06-22 15:10:40.000691", "msg": "non-zero return code", "rc": 1, "start": "2024-06-22 15:10:39.754198", "stderr": "error: no matching resources found", "stderr_lines": ["error: no matching resources found"], "stdout": "", "stdout_lines": []}

and

Error 2: TASK [apply-manifests : Apply metallb L2 Advertisement] skipping: [server2] skipping: [server3] fatal: [server1]: FAILED! => {"changed": true, "cmd": ["kubectl", "apply", "-f", "https://raw.githubusercontent.com/JamesTurland/JimsGarage/main/Kubernetes/RKE2/l2Advertisement.yaml"], "delta": "0:00:00.808704", "end": "2024-06-22 18:33:06.366483", "msg": "non-zero return code", "rc": 1, "start": "2024-06-22 18:33:05.557779", "stderr": "Error from server (InternalError): error when creating "https://raw.githubusercontent.com/JamesTurland/JimsGarage/main/Kubernetes/RKE2/l2Advertisement.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\": no endpoints available for service "webhook-service"", "stderr_lines": ["Error from server (InternalError): error when creating "https://raw.githubusercontent.com/JamesTurland/JimsGarage/main/Kubernetes/RKE2/l2Advertisement.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": no endpoints available for service "webhook-service""], "stdout": "", "stdout_lines": []}