Search code examples
kubernetescalico

Unable to setup Calico on Kubernetes


Trying to set up Calico on-premises Kubernetes cluster.

Initializing cluster kubeadm init --pod-network-cidr=192.168.0.0/16 Using https://docs.projectcalico.org/manifests/calico.yaml manifest.

~# calicoctl node status
Calico process is running.

IPv4 BGP status
+---------------+-------------------+-------+----------+---------+
| PEER ADDRESS  |     PEER TYPE     | STATE |  SINCE   |  INFO   |
+---------------+-------------------+-------+----------+---------+
| 10.25.13.69   | node-to-node mesh | start | 13:49:12 | Connect |
+---------------+-------------------+-------+----------+---------+

calico-node complains: calico/node is not ready: BIRD is not ready: BGP not established with 10.25.13.69

What Connect actually means? Where to look for the problem? Could it be related to the multiple kubeadm reset?


Solution

  • As nodes had different network interfaces, calico-node autodetected different networks on nodes. To fix this I added IP_AUTODETECTION_METHOD env var to calico-node DaemonSet. In my case I used these env var values:

       # Auto-detect the BGP IP address.
       - name: IP
         value: "autodetect"
       - name: IP_AUTODETECTION_METHOD
         value: cidr=10.0.0.0/8