MetalLb Configuration on Oracle Cloud Infra. - No Route to Host in Controller Logs - STATE=CrashLoopBackOff

I am learning Kubernetes and this is my environment

  • Cloud: Oracle Cloud Infrastructure
  • VM: 02 ARM with 4 CPU and 12GB
  • OS: Ubuntu 20.04 Image Build 2023.60.30-0

Installed Kubernetes with the Following init parameters.
With Flannel Network Addon

 sudo kubeadm init phase certs all && 
 sudo kubeadm init phase kubeconfig all && 
 sudo kubeadm init phase control-plane all --pod-network-cidr &&
 sudo sed -i 's/initialDelaySeconds: [0-9][0-9]/initialDelaySeconds: 240/g' /etc/kubernetes/manifests/kube-apiserver.yaml &&
 sudo sed -i 's/failureThreshold: [0-9]/failureThreshold: 18/g' /etc/kubernetes/manifests/kube-apiserver.yaml &&
 sudo sed -i 's/timeoutSeconds: [0-9][0-9]/timeoutSeconds: 20/g' /etc/kubernetes/manifests/kube-apiserver.yaml &&
 sudo kubeadm init \
   --v=1 \
   --skip-phases=certs,kubeconfig,control-plane \
   --ignore-preflight-errors=all \

I have Installed MetalLb using this with strictARP set to True

kubectl apply -f

Created a Layer 2 Config Define The IPs To Assign To The Load Balancer Services with the following using the kubectl create -f


kind: IPAddressPool
  name: first-pool
  namespace: metallb-system

and L2Advertisement

kind: L2Advertisement
  name: example
  namespace: metallb-system

This is the output of kubectl get pods --all-namespaces -o wide

NAMESPACE        NAME                                  READY   STATUS              RESTARTS        AGE     IP           NODE            NOMINATED NODE   READINESS GATES
kube-flannel     kube-flannel-ds-9xtbs                 1/1     Running             3 (3h32m ago)   6h41m   kube-master     <none>           <none>
kube-flannel     kube-flannel-ds-d8v22                 1/1     Running             0               6h41m    kube-worker-1   <none>           <none>
kube-system      coredns-5dd5756b68-ftm87              0/1     Running             0               7h12m   kube-worker-1   <none>           <none>
kube-system      coredns-5dd5756b68-h5tsz              0/1     Running             0               7h12m   kube-worker-1   <none>           <none>
kube-system      etcd-kube-master                      1/1     Running             3 (3h32m ago)   7h12m   kube-master     <none>           <none>
kube-system      kube-apiserver-kube-master            1/1     Running             3 (3h32m ago)   7h12m   kube-master     <none>           <none>
kube-system      kube-controller-manager-kube-master   1/1     Running             3 (3h32m ago)   7h12m   kube-master     <none>           <none>
kube-system      kube-proxy-kkdjx                      1/1     Running             0               6h42m    kube-worker-1   <none>           <none>
kube-system      kube-proxy-l9p6f                      1/1     Running             3 (3h32m ago)   7h12m   kube-master     <none>           <none>
kube-system      kube-scheduler-kube-master            1/1     Running             3 (3h32m ago)   7h12m   kube-master     <none>           <none>
metallb-system   controller-7d56b4f464-fgszp           0/1     CrashLoopBackOff    62 (2m8s ago)   4h54m   kube-worker-1   <none>           <none>
metallb-system   speaker-85nxj                         0/1     ContainerCreating   0               4h54m   kube-master     <none>           <none>
metallb-system   speaker-96pb9                         0/1     ContainerCreating   0               4h54m    kube-worker-1   <none>           <none>

Node Status

NAME            STATUS   ROLES           AGE     VERSION
kube-master     Ready    control-plane   7h25m   v1.28.2
kube-worker-1   Ready    <none>          6h54m   v1.28.2

output of kubectl -n metallb-system get all

NAME                              READY   STATUS              RESTARTS        AGE
pod/controller-7d56b4f464-fgszp   0/1     CrashLoopBackOff    64 (5m7s ago)   5h7m
pod/speaker-85nxj                 0/1     ContainerCreating   0               5h7m
pod/speaker-96pb9                 0/1     ContainerCreating   0               5h7m

NAME                      TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)   AGE
service/webhook-service   ClusterIP   <none>        443/TCP   5h7m

daemonset.apps/speaker   2         2         0       2            0    5h7m

NAME                         READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/controller   0/1     1            0           5h7m

NAME                                    DESIRED   CURRENT   READY   AGE
replicaset.apps/controller-7d56b4f464   1         1         0       5h7m

This is the logs of the metallb-system controller using command kubectl logs controller-7d56b4f464-fgszp --namespace=metallb-system which says no route to Host.

{"branch":"dev","caller":"main.go:155","commit":"dev","goversion":"gc / go1.19.5 / arm64","level":"info","msg":"MetalLB controller starting version 0.13.11 (commit dev, branch dev)","ts":"2023-09-29T15:17:51Z","version":"0.13.11"}

{"level":"error","ts":"2023-09-29T15:17:51Z","msg":"Failed to get API Group-Resources","error":"Get \"\": dial tcp connect: no route to host","stacktrace":"\n\t/go/pkg/mod/\\n\t/go/pkg/mod/\\n\t/go/\nmain.main\n\t/go/\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:250"}

{"level":"error","ts":"2023-09-29T15:17:51Z","logger":"setup","msg":"unable to start manager","error":"Get \"\": dial tcp connect: no route to host","stacktrace":"\n\t/go/\nmain.main\n\t/go/\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:250"}

These are my Routes using the ip route command

default via dev enp0s6
default via dev enp0s6 proto dhcp src metric 100 dev enp0s6 proto kernel scope link src via dev flannel.1 onlink dev enp0s6 scope link dev enp0s6 proto dhcp scope link src metric 100

Tried to add the route with this command route add gw but yet no luck…

Any suggestions are welcomed…