Skip to content

[Problem RFC] Calico route-reflector selector drift partitions cross-node pod networking #827

Closed

Description

@thromel

I would like to propose a new Hotel Reservation problem based on Reddit's Pi-Day outage.

During Reddit's Kubernetes 1.23 to 1.24 upgrade, a Calico route-reflector topology still depended on the legacy node-role.kubernetes.io/master node label. As the cluster moved to the newer node-role.kubernetes.io/control-plane labeling convention, the Calico BGPPeer selector stopped matching the intended control-plane route-reflector nodes. In a Calico BGP topology with nodeToNodeMeshEnabled: false, losing the route-reflector peerings can partition cross-node pod and service traffic while many application containers still appear Running. The visible symptoms may look like DNS, application, or admission-controller noise, but the root cause is stale CNI/BGP peer selection after a Kubernetes label migration.

References:

I checked for overlap before opening this. I did not find an existing issue or PR for the Reddit Pi-Day outage, Calico route-reflector selector drift, BGPPeer selector drift, or the node-role.kubernetes.io/master to node-role.kubernetes.io/control-plane migration.

The closest existing SREGym work looks different:

Required cluster mode

This problem requires a disposable multi-node Kind cluster with the default CNI disabled and Calico installed in a BGP-based mode where cross-node pod routes depend on Calico BGP peerings. A VXLAN-only Calico configuration is not sufficient, because route-reflector peer loss would not necessarily break pod traffic.

Minimum intended topology:

kind-control-plane   route reflector, no app workloads
kind-worker          app/probe node A
kind-worker2         app/probe node B

Proposed simulation

For SREGym, the proposed simulation would deploy Hotel Reservation on a multi-node Calico cluster, then configure Calico route-reflector mode:

  • BGPConfiguration/default has nodeToNodeMeshEnabled: false.
  • The control-plane node is annotated as a route reflector.
  • A BGPPeer selects route reflectors using has(node-role.kubernetes.io/master).

The setup would first add the old node-role.kubernetes.io/master label so the topology is healthy. Fault injection would then remove that legacy label, matching the control-plane label migration pattern from the real incident. The BGPPeer selector no longer matches a route-reflector node, so cross-node service traffic fails even though the affected app pods may remain Running.

I would also add a small synthetic probe pair, because Hotel Reservation symptoms can be noisy:

netprobe-a pinned to worker A
netprobe-b pinned to worker B
netprobe-b exposes HTTP /health
netprobe-a curls netprobe-b through both Pod IP and Service DNS

The expected fault shape is:

  • same-node traffic remains healthy.
  • cross-node Pod IP traffic fails.
  • cross-node Service traffic fails.
  • DNS may be healthy or may show downstream noise, but DNS alone is not the diagnosis.

Validation plan

The proof-of-concept should first prove the healthy topology:

  • Calico is running in BGP mode.
  • BGPConfiguration/default.spec.nodeToNodeMeshEnabled is false.
  • the route-reflector node has routeReflectorClusterID configured.
  • the BGPPeer selector matches the route-reflector node.
  • cross-node synthetic probe traffic succeeds.

After fault injection:

  • the legacy node-role.kubernetes.io/master label is removed.
  • the BGPPeer selector matches zero route-reflector nodes.
  • cross-node synthetic probe traffic fails.
  • Hotel Reservation shows request failures or dependency failures while relevant pods may remain Running.

After mitigation:

  • the BGPPeer selector matches the intended route-reflector node again, preferably through a stable custom label such as route-reflector=true.
  • cross-node synthetic probe traffic succeeds.
  • Hotel Reservation request probes succeed.
  • route-reflector mode remains enabled and node-to-node mesh remains disabled.

Diagnosis and mitigation

A good diagnosis should identify the stale Calico BGPPeer selector and the Kubernetes control-plane label migration as the root cause. It should not stop at generic DNS failure, pod restarts, application logs, or API/admission-controller noise.

Accepted mitigations:

  • patch the BGPPeer peer selector to match node-role.kubernetes.io/control-plane;
  • add a stable route-reflector=true label and patch the peer selector to use it;
  • deliberately restore the legacy label to the intended route-reflector node.

Rejected shortcuts:

  • enable node-to-node mesh to bypass route reflectors;
  • delete BGPPeer or BGPConfiguration resources instead of repairing the topology;
  • delete Calico;
  • schedule all app/probe pods onto one node;
  • scale down Hotel Reservation;
  • hardcode Pod IPs or ClusterIPs.

This should be treated as an infrastructure-heavy RFC. The next useful step is a minimal Kind + Calico BGP proof-of-concept that shows this full loop: healthy cross-node traffic, remove the stale route-reflector label, cross-node traffic breaks, patch selector or label, cross-node traffic recovers.

Activity

  1. changed the title [-][Problem RFC] Calico route-reflector label drift breaks pod networking[/-] [+][Problem RFC] Calico route-reflector selector drift partitions cross-node pod networking[/+] on May 30, 2026
  2. Saadmrp1038 commented on May 30, 2026

    @Saadmrp1038
    Collaborator

    @thromel Thanks for the RFC! The plan looks good. It's funny that trying to remove master caused this outage XD

    I just had a few suggestions:

    1. We don't really want to touch the cluster setup scripts. That means no changes to kind/setup_kind_cluster.sh or scripts/ansible/setup_cluster.yml. Configuring route-reflector mode there would change the baseline for every other problem and could clash with any future faults that depend on a different setting. From the Calico docs it seems that the BGP topology is runtime-configurable, so what we could do is set it up at the start of this fault and clean it up afterwards. Since this modifies a cluster-wide setting, we'd also need to add a global cleanup in conductor.py for cases where the program exits mid-run and Calico is left stuck in route-reflector mode. Lemme know if the runtime configuration is possible or not.

    2. We'll also need to add the necessary RBAC in the MCP for the BGP-related commands.

  3. tianyin commented on Jun 4, 2026

    @tianyin
    Contributor

    I close the RFC as it's already implemented in #828

    Thanks for the initiatives @thromel !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions