I’m trying to run a Kubernetes cluster on a single Raspberry Pi for a personal use and so far have installed MetalLB along with Nginx to provide LoadBalancer services.
This is the guide I’m trying to follow (this will be my ultimate goal as well): https://greg.jeanmart.me/2020/04/13/install-and-configure-a-kubernetes-cluster-w/
It required some tweaking, but because I really suck at networking I got to the point where majority of my pods are running (besides the one with the duplicated port), but my load balancing is defo wrong and for some reason metallb-speaker shares the same IP with my master (192.168.0.17).
SVC:
NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
default kubernetes ClusterIP 10.43.0.1 <none> 443/TCP 115m
default test-service LoadBalancer 10.43.115.189 <pending> 8080:31117/TCP 77m
kube-system kube-dns ClusterIP 10.43.0.10 <none> 53/UDP,53/TCP,9153/TCP 115m
kube-system metallb-webhook-service ClusterIP 10.43.131.11 <none> 443/TCP 94m
kube-system metrics-server ClusterIP 10.43.194.117 <none> 443/TCP 115m
kube-system nginx-ingress-ingress-nginx-controller LoadBalancer 10.43.3.246 <pending> 80:30127/TCP,443:32595/TCP 83m
kube-system nginx-ingress-ingress-nginx-controller-admission ClusterIP 10.43.172.94 <none> 443/TCP 83m
kube-system traefik LoadBalancer 10.43.212.63 <pending> 80:32404/TCP,443:32029/TCP 114m
PODS:
NAME READY STATUS RESTARTS AGE
coredns-7647b64657-8dhzx 1/1 Running 3 (2m24s ago) 71m
helm-install-traefik-crd-4xwkc 0/1 Completed 0 115m
helm-install-traefik-vfp4h 0/1 Completed 1 115m
local-path-provisioner-59c9dd488-dqh8j 1/1 Running 3 (2m24s ago) 71m
metallb-controller-8dcbdd89b-rhfpg 1/1 Running 1 (2m24s ago) 9m1s
metallb-speaker-qtbn2 4/4 Running 4 (2m24s ago) 9m1s
metrics-server-5d85bcbc8b-ktslg 1/1 Running 3 (2m24s ago) 71m
nginx-ingress-ingress-nginx-controller-645dc78648-g52mx 1/1 Running 3 (2m24s ago) 71m
svclb-nginx-ingress-ingress-nginx-controller-3123b3bd-d8tk7 0/2 Pending 0 84m
svclb-test-service-d146cfdd-lszw2 1/1 Running 2 (2m24s ago) 54m
svclb-traefik-cbb30ddb-xntlf 2/2 Running 6 (2m24s ago) 115m
traefik-ff6698b4d-vxfkw 1/1 Running 3 (2m24s ago) 71m
METALLB:
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
metallb-controller-8dcbdd89b-rhfpg 1/1 Running 1 (5m38s ago) 12m 10.42.0.40 raspberrypi <none> <none>
metallb-speaker-qtbn2 4/4 Running 4 (5m38s ago) 12m 192.168.0.17 raspberrypi <none> <none>
metallb-config.yaml
apiVersion: v1
kind: ConfigMap
metadata:
namespace: kube-system
name: config
data:
config: |
address-pools:
- name: default
protocol: layer2
addresses:
- 192.168.0.240-192.168.0.250
- Verified that no other devices on my network are using IPs in the range 192.168.0.240-192.168.0.250
- Reapplied the MetalLB configuration.
- Restarted MetalLB pods.
- Checked service annotations for any specific IP assignments.
- Checked the logs from the MetalLB controller and speaker and it seems that there is an issue with IP assignment for the services. Specifically, the error message:
"error":"assigned IP not allowed by config","ips":["192.168.0.17"],"level":"error","msg":"IP allocated by controller not allowed by config"
How can I configure MetalLB to correctly assign IPs from the specified range and avoid using the node’s IP? Is there any additional configuration I might be missing? I’ll appreciate any assistance, thanks in advance!
Sitro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1