kube-router: Mismatched local address when peering with external router on difference network

What happened?

kube-router v1.5 did not peer with external router on difference network (Mismatched local address) My cluster setup has worker nodes join 2 difference networks (see figure bellow) and kube-router was configured to peer with external router https://github.com/cloudnativelabs/kube-router/blob/master/docs/bgp.md#peering-outside-the-cluster

What did you expect to happen?

Peer state is Established

How can we reproduce the behavior you experienced?

Steps to reproduce the behavior:

  1. Step 1: Setup k8s cluster with workers join 2 difference networks as diagram bellow
  2. Step 2: Install kube-router with params --peer-router-ips --peer-router-asns to peer with external router
  3. Step 3: Check BGP neighbors on kube-router gobgp neighbor to see that the peer state did not Established

Screenshots / Architecture Diagrams / Network Topologies

                      ----|-----------------|--------------- network A (10.21.136.0/24)
                      workerA             workerB                 
--------|-----------------|-----------------|--------------- network B (10.99.0.0/24)
    External Peer

System Information (please complete the following information):

  • Kube-Router Version: v1.5.0
  • Kube-Router Parameters: --peer-router-ips=<EXTERNAL_PEER_IP>
  • Kubernetes Version: v1.22.10
  • Cloud Type: on premise
  • Kubernetes Deployment Type: custom
  • Kube-Router Deployment Type: DaemonSet
  • Cluster Size: 2

Logs, other output, metrics

time="2022-10-10T09:45:09Z" level=info msg="Mismatched local address" Addr=10.99.0.6 BindInterface= Configured addr=10.21.136.204 Key=10.99.0.2 Topic=Peer
Peer         AS Up/Down State       |#Received  Accepted
10.99.0.2 64513   never Active      |        0         0
10.99.0.3 64513   never Active      |        0         0

Additional context

This PR seem to be the reason https://github.com/cloudnativelabs/kube-router/pull/777

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (6 by maintainers)

Most upvoted comments

This should be fixed with the merging of #1392

This should be test-able using the kube-router-git container from Docker Hub.

@pmint93 in regards to annotations not being ideal, I think that this will get fixed other ways in the future. There are already two open issues / comments for this issue:

I intend to look into both of them once I’m done finishing up the dual-stack work that the project has been working towards.

In the meantime, not upgrading to v1.5.0 or ensuring that the annotation is present before kube-router starts, or doing a rollout restart should fix the issue.

Closing this issue for now just as a matter of house-cleaning, but @rkojedzinszky / @pmint93 feel free to comment if you discover further issues after testing the fix and I’ll re-open.