Multi-Cluster Networking (Submariner, KubeFed) in Kubernetes

Multi-Cluster Networking (Submariner, KubeFed) in Kubernetes

How separate Kubernetes clusters learn to talk to each other, why spreading workloads and connecting networks are two different problems, and what Submariner and KubeFed each really do.

Imagine two neighbouring cities. Each one has its own street names, its own house numbers, its own post office and its own phone book. Both happen to have a “10 Main Street”. Inside each city everything works smoothly. But the day a shop in the first city wants to send a parcel to a warehouse in the second, trouble starts. Which “10 Main Street” is meant? Which post office is responsible? Is the road between the cities even open? Who checks the parcel at the border?

Kubernetes clusters are exactly like those cities. Inside one cluster, every Pod has an address, every Service has a name, and traffic flows without fuss. Between two clusters, none of that is automatic. Addresses can clash, names are not shared, and there is no road. Multi-cluster networking is the set of techniques that build the roads, the shared phone book and the border checks.

Two names dominate this topic: Submariner and KubeFed. They are often mentioned together, which leads many people to believe they do the same job. They do not. One connects networks, the other spreads configuration. In this guide you will learn what each one does, how traffic really travels between clusters, what can go wrong, and how to run it in production. Every new term is explained the first time it appears, and nothing is assumed.

1What Is Multi-Cluster Networking?

Start with the plain meaning, then add detail one layer at a time.

A Kubernetes cluster is a group of machines, called nodes, managed together as one system. Applications run inside the cluster as Pods, and Kubernetes gives them networking, storage and scheduling. Many organisations do not stop at one cluster. They run several: one per region, one per team, one per cloud provider, or one per environment. Once there is more than one, a natural question appears: how do applications in one cluster talk to applications in another?

Multi-cluster networking is the answer to that question. It covers three jobs:

Job 1

Connectivity

Make a network path exist between the Pods and Services of different clusters, usually through an encrypted tunnel, so that packets can travel from one to the other.

Job 2

Discovery

Let an application find a service in another cluster by name, in the same way it finds a service in its own cluster.

Job 3

Policy and trust

Decide which clusters may talk, protect the traffic in transit and keep the clusters from harming each other.

Everyday analogy

Think of an international airline alliance. Each airline runs its own planes, crews and schedules. Customers want one ticket that works across partners. The alliance needs shared airports (connectivity), one combined timetable (discovery) and agreed security rules at every gate (policy). Without it, each airline is an island. Multi-cluster networking is the alliance for clusters.

2
different problems: spreading config and connecting networks
3
jobs to do: connect, discover, protect
N
clusters that may need to cooperate

Where Submariner and KubeFed fit

Submariner is an open-source project that connects the networks of different clusters and provides cross-cluster service discovery. KubeFed (Kubernetes Cluster Federation) is a project that spreads Kubernetes objects such as Deployments from one control cluster to many member clusters. Put very simply, Submariner builds the roads between the cities. KubeFed sends the same building plans to all of them. A complete multi-cluster design often needs both kinds of help, but they are not interchangeable. Chapter 5 is devoted to this distinction because it is the most common source of confusion.

2Why Organisations Run More Than One Cluster

One large cluster is simpler to operate, so people usually start there. Over time, strong reasons push them towards several.

ReasonWhat it meansExample
Blast radiusA fault, a bad upgrade or a security breach affects only one clusterA failed control plane upgrade takes down the staging cluster, not production
Geography and latencyRun applications close to users in different regionsA streaming company keeps clusters in Europe, the Americas and Asia
High availabilitySurvive the loss of a whole region or cloudA payment service has an active cluster and a standby in another region
Compliance and data residencyKeep certain data inside certain borders or networksA bank keeps customer data in clusters located in the customer’s country
Scale limitsA single cluster has practical limits, with tested guidance of up to about five thousand nodesA very large platform splits into several clusters of manageable size
Team and tenant isolationSeparate clusters give strong separation between teams or customersA software vendor runs one cluster per large customer
Hybrid and multi-cloudCombine on-premises data centres with one or more public cloudsA retailer keeps stores’ systems on premises and web shops in the cloud
MigrationMove gradually from an old cluster to a new oneWorkloads are shifted service by service while both clusters run
Edge computingMany small clusters near factories, shops or towersA telecom company runs small clusters at hundreds of sites
!
Do not rush

More clusters mean more things to upgrade, secure and monitor. Teams should have a clear reason for each new cluster. Multi-cluster networking solves the problems that come after that decision. It is not a reason to make the decision.

What breaks the moment you have two clusters

When everything lived in one cluster, a lot of things were quietly provided for free: every Pod could reach every other Pod, every Service had a stable name, and there was only one place to look for anything. The moment a second cluster appears, each of those comforts has to be recreated on purpose. That is the work of the rest of this guide.

Inside one cluster the network is a gift. Between clusters it is a project.

3Core Concepts: How Networking Works Inside One Cluster

To see what must be rebuilt between clusters, first see what a single cluster provides.

Pod addresses and the flat network

Every Pod receives its own IP address from a range called the Pod CIDR. CIDR (Classless Inter-Domain Routing) is simply a compact way to write a block of addresses, for example 10.1.0.0/16, which means all addresses beginning 10.1. The Kubernetes network model says that any Pod can reach any other Pod directly by its IP, without address translation. People call this a flat network.

The CNI plugin

The piece of software that actually builds this flat network on the nodes is the CNI plugin (Container Network Interface). Well-known examples are Calico, Cilium, Flannel and the plugins offered by cloud providers. They create virtual network interfaces, set up routes and sometimes build overlay tunnels between nodes. A CNI plugin knows only about its own cluster.

Services and kube-proxy

Pods come and go, so their addresses change. A Service gives a group of Pods one stable virtual address, the ClusterIP, taken from a separate range called the Service CIDR. A component called kube-proxy, or an equivalent built into some CNI plugins, programs rules on every node so that traffic sent to the ClusterIP is spread across the healthy Pods behind it. The ClusterIP is not a real machine. It exists only as rules inside the cluster.

DNS

People do not type IP addresses. Each cluster runs a DNS server, usually CoreDNS, which turns a name such as orders.shop.svc.cluster.local into the Service’s ClusterIP. The suffix cluster.local is the cluster’s own domain. Note the important detail: every cluster uses the same default suffix, so the name means “the one in my own cluster”, never “somewhere else”.

Building blockWhat it gives you inside one clusterWhy it does not automatically reach other clusters
Pod CIDR and CNIEvery Pod gets a reachable addressThe CNI only builds routes for its own cluster’s nodes
Service CIDR and kube-proxyStable virtual addresses with load balancingClusterIP rules exist only inside each cluster
CoreDNS and cluster.localHuman-friendly namesThe same suffix means a different thing in each cluster
NetworkPolicyRules about which Pods may talkPolicies apply within a cluster and do not know remote Pods
Identity through service accountsPods can prove who they are to the API serverAnother cluster does not know or trust those identities
i
Tip

Keep this table in mind. Every multi-cluster tool is, in the end, an answer to one or more of the “why it does not reach other clusters” cells.

4Why Single-Cluster Assumptions Break Across Clusters

Five specific problems appear when a second cluster is added. Each one has a standard remedy.

1

No route exists

A Pod in cluster East sends a packet to an address in cluster West. Nothing between them knows how to carry it. Pod addresses are usually private and invisible beyond their own cluster. The remedy is a tunnel or routed link between the clusters.

2

Address ranges overlap

Many clusters are built from the same defaults, so two of them may both use 10.244.0.0/16 for Pods. An address then points to two different Pods in two clusters, and routing becomes impossible. The remedy is careful planning of non-overlapping ranges, or a translation layer that gives the clusters unique “global” addresses.

3

Names do not travel

The name orders.shop.svc.cluster.local only resolves inside the cluster that owns it. The remedy is a shared naming scheme for services that live in many clusters.

4

Traffic crosses untrusted space

Cluster-to-cluster traffic often crosses the public internet or a shared provider network. It must be encrypted and the two ends must prove who they are.

5

Configuration drifts apart

When the same application runs in three clusters, the three copies of its configuration slowly diverge unless something keeps them aligned. The remedy is a way to define resources once and propagate them.

Which problem does which tool address?

ProblemTypical remedyExample tool
No route between clustersEncrypted tunnels between gateway nodes, or routed private linksSubmariner, cloud peering
Overlapping address rangesPlanning, or global addressing with translationSubmariner Globalnet
Names do not travelCross-cluster service discovery and a shared domainSubmariner Lighthouse, the Multi-Cluster Services API
Untrusted transitEncryption, authentication, policyIPsec or WireGuard tunnels, service mesh mutual TLS
Configuration driftFederation or fleet managementKubeFed and its successors, GitOps tools
i
Good to know

The overlapping range problem is the one most often discovered too late. Clusters created from default settings by different teams almost always collide. Checking ranges before connecting clusters saves enormous pain, and fixing overlap on a running cluster is usually painful or impossible.

5Two Different Problems: Control Plane vs Data Plane

This is the single most important idea in the whole guide.

When people say “multi-cluster”, they mix up two layers that work separately.

Layer 1

Control plane: what runs where

Deciding which Deployments, ConfigMaps, Services and policies should exist in which clusters, and keeping them in sync. This is about objects and intent. It uses the Kubernetes API of each cluster. KubeFed lives here.

Layer 2

Data plane: how traffic flows

Letting packets actually travel between Pods and Services in different clusters, and letting applications find each other. This is about packets and names. Submariner lives here.

flowchart TB
  subgraph CP["Control plane: what to run where, for example KubeFed"]
    HUB["Hub cluster holding the desired state"]
  end
  subgraph DP["Data plane: how Pods and Services talk, for example Submariner"]
    C1["Cluster East"] |"encrypted tunnel"| C2["Cluster West"]
  end
  HUB -->|"propagates Deployments and Services"| C1
  HUB -->|"propagates Deployments and Services"| C2
    
Figure 1. Federation spreads objects. Connectivity carries traffic.

Why mixing them up causes trouble

  • If you install KubeFed and expect Pods in different clusters to talk, nothing happens. KubeFed will happily copy a Deployment to three clusters, but it builds no network between them.
  • If you install Submariner and expect your Deployments to appear in every cluster, nothing happens either. Submariner connects networks, but it never copies workloads.
  • A real multi-cluster platform usually needs both layers, chosen independently. You can have connectivity without federation, and federation without connectivity.
Everyday analogy

A restaurant chain has two separate jobs. Head office sends the same menu and recipes to every branch (control plane, like KubeFed). A separate logistics team runs delivery trucks between the branches so that ingredients can move (data plane, like Submariner). Sending recipes does not move a single tomato, and running trucks does not teach anyone a recipe.

A quick comparison

QuestionKubeFedSubmariner
Main purposePropagate Kubernetes objects to many clustersConnect cluster networks and share service names
LayerControl plane (API objects)Data plane (packets and DNS)
Moves application traffic?NoYes
Copies Deployments between clusters?YesNo
Needs non-overlapping address ranges?NoYes, unless Globalnet is used
Uses a tunnel?No, only API callsYes, between gateway nodes
Project statusArchived by the Kubernetes community, see chapter 8Active, part of the CNCF

6The Main Approaches to Multi-Cluster Networking

Submariner is one of several ways to connect clusters. Knowing the others helps you choose well.

ApproachHow it worksStrengthsWeaknesses
Flat routed networkCloud peering, transit gateways or physical routing make Pod ranges reachable between clustersNo tunnels, native speed, simple modelNeeds non-overlapping ranges and network engineering, differs on each cloud
Gateway tunnels (Submariner)Encrypted tunnels between a few gateway nodes, with route agents on every nodeWorks across clouds and CNIs, encrypted, direct Pod-to-Pod and Service-to-ServiceGateway can be a bottleneck, needs open ports, needs non-overlap or Globalnet
Service mesh with gatewaysEast-west gateways forward application traffic between meshes, with mutual TLSRich traffic policy, strong identity, works across overlapping rangesOnly for traffic in the mesh, more components, application-layer focus
eBPF cluster meshThe CNI itself shares state between clusters and routes directlyFast, global services, integrated policyTies you to one CNI, needs reachable nodes and non-overlapping ranges
Cloud provider multi-cluster servicesThe provider offers managed export and import of servicesEasy, managed, integrated with the cloudLocked to one provider, less flexible
Global load balancing and ingressClusters expose public or private entry points, DNS or a global balancer sends users to the nearest healthy oneSimple, well understood, no cluster-to-cluster plumbingOnly for traffic entering from outside, not for internal service-to-service calls

How to think about the choice

  • If users enter from the internet and clusters never need to call each other, a global load balancer is often enough and the simplest answer.
  • If services in different clusters must call each other directly, you need a connectivity layer such as tunnels, a mesh or a routed network.
  • If you want strong per-request identity and traffic control, a service mesh across clusters adds value, usually on top of a base connectivity layer.
  • If your clusters all use one CNI and are in the same trust zone, the CNI’s own mesh can be the smoothest option.
  • If you span clouds and CNIs and need Layer 3 reachability, a CNI-independent tunnel project such as Submariner fits the need.
i
Tip

These approaches can be stacked. A common production design uses routed or tunnelled connectivity underneath, service discovery on top, and a mesh above that for identity and policy. Each layer solves one problem well.

7KubeFed in Depth: Architecture and Concepts

KubeFed answers one question: how do I define something once and have it appear in many clusters?

The cast of characters

Role

Host cluster

The cluster that runs the KubeFed controllers and holds the federated resources. It is the place where you write your intent.

Role

Member clusters

The clusters that receive the propagated resources and actually run the workloads. The host can also be a member of itself.

Role

KubeFedCluster

An object in the host that describes one member: its API address and the credentials the host uses to talk to it.

Role

Federated type

A wrapper kind created for a normal kind. For a Deployment there is a FederatedDeployment. Each wrapper carries the pieces described below.

The three parts of every federated resource

T

Template

The ordinary resource definition, for example the Deployment you would normally write. This is what will exist in each chosen cluster.

P

Placement

Which clusters should receive it. You can list clusters by name or select them by labels, such as all clusters labelled as being in a certain region.

O

Overrides

Small per-cluster changes to the template, for example fewer replicas in a small cluster or a different image registry in a particular region.

flowchart TB
  USER["User or pipeline applies a federated resource"] --> HOST["KubeFed host cluster API"]
  HOST --> CTRL["KubeFed controllers: sync, status, scheduling"]
  CTRL -->|"push template with overrides"| M1["Member cluster East"]
  CTRL -->|"push template with overrides"| M2["Member cluster West"]
  CTRL -->|"push template with overrides"| M3["Member cluster South"]
  M1 -->|"report status"| CTRL
  M2 -->|"report status"| CTRL
  M3 -->|"report status"| CTRL
    
Figure 2. KubeFed pushes desired state from the host to every member

How propagation works

KubeFed uses a push model. A sync controller in the host watches federated resources. For each one it reads the placement, builds the final object for every chosen cluster by applying that cluster’s overrides to the template, and creates or updates the real object in the member. It also watches the member objects. If someone edits or deletes the copy in a member by hand, the controller notices and puts it back. The host is therefore the single source of truth.

Enabling a type

Not every kind is federated automatically. An administrator enables each kind with an object called a FederatedTypeConfig. This creates the matching federated wrapper kind and starts the controllers for it. Namespaces are federated first, because a resource can only be propagated into a namespace that exists in the member.

Smart replica spreading

A feature called ReplicaSchedulingPreference lets you say “run twelve replicas in total, spread across these clusters by weight, with at least two in each”. KubeFed then divides the replicas and adjusts the per-cluster counts. It is a simple form of multi-cluster scheduling, working at the level of replica numbers.

Multi-cluster DNS through the outside world

KubeFed also included objects for publishing the addresses of a service from several clusters into an external DNS system. This provides name-based discovery for traffic arriving from outside, using a separate tool that edits records at a DNS provider. It is not a replacement for in-cluster discovery of pods and services, and it is not a network connection.

!
Important limit

KubeFed never creates a path between clusters. Copying a Service object into three clusters gives you three independent Services, each with a ClusterIP that is valid only in its own cluster.

8KubeFed in Practice: Lifecycle, Strengths, Limits and Status

The life of a federated application

1

Install on the host

Deploy the KubeFed controller manager and its web hook into the host cluster.

2

Join member clusters

Use the command line tool to register each member. This creates the KubeFedCluster object and gives the host credentials for the member.

3

Federate a namespace

Create a FederatedNamespace so that the namespace appears in the chosen members.

4

Enable the kinds you need

Add FederatedTypeConfig entries for Deployments, Services, ConfigMaps and anything else.

5

Create federated resources

Write the template, the placement and any overrides, then apply it to the host.

6

Observe

The status shows in which clusters the resource was created and whether each propagation succeeded.

7

Change and retire

Edit the host copy and all members follow. Deleting the host copy deletes the member copies.

What KubeFed did well

  • One place to define resources for many clusters.
  • Clear separation of template, placement and overrides.
  • Automatic correction of drift in members.
  • Basic replica spreading across clusters.
  • Cluster registration through a simple join step.

Where it fell short

  • Users had to rewrite ordinary resources as federated wrappers, so existing tools did not work unchanged.
  • Every federated kind needed its own generated type and controller.
  • The host was a central dependency for all changes.
  • It never moved beyond beta status.
  • It provided no networking between clusters.

Status of the project

KubeFed was developed under the Kubernetes multi-cluster special interest group, but it never reached a stable release and the project has since been archived by the community. Its repository is no longer under active development. If you meet it in an existing platform, you should plan a path away from it. If you are starting fresh, choose a currently maintained alternative. Please confirm the current status on the project page before deciding, since open source projects change.

i
Why we still study it

KubeFed introduced the vocabulary of template, placement and override that its successors still use in some form. Understanding it makes every later tool easier, and many articles and older platforms still refer to it.

9Beyond KubeFed: Modern Ways to Manage Many Clusters

The need that KubeFed addressed is real, and several active projects now meet it.

ToolMain ideaHow resources are distributedNotes
KarmadaA multi-cluster control plane that works with normal Kubernetes resourcesYou write ordinary Deployments plus separate policy objects for placement and overridesNo need to rewrite resources as wrappers. Includes multi-cluster service features.
Open Cluster ManagementA hub that manages many spoke clustersManifests and placement decisions are delivered, with agents on each spoke pulling the workPull model suits clusters behind firewalls. Has add-ons, including one for Submariner.
GitOps with Argo CD ApplicationSets or FluxGit is the source of truth and a generator targets many clustersEach cluster receives manifests from Git, selected by labels or listsVery popular and simple. Not a networking tool.
LiqoPeer clusters so that one appears as a virtual node of anotherPods scheduled to the virtual node run in the remote clusterAlso builds a network fabric between peers.
AdmiraltyMulti-cluster schedulingPods are proxied to a chosen target clusterFocus on scheduling across clusters.
Cluster APICreate and upgrade clusters declarativelyManages clusters themselves, not the workloads inside themOften used together with the tools above.

How to choose

  • If your team already lives in Git and wants simple, reviewable delivery to many clusters, a GitOps tool is usually enough.
  • If you want a dedicated multi-cluster API with placement policies and failover, a project like Karmada or Open Cluster Management fits.
  • If you want a cluster to borrow capacity from another one, look at virtual-node approaches.
  • In every case, decide the connectivity layer separately, because none of the above removes the need for it, except where a project explicitly bundles networking.

A common modern combination

A platform team uses Cluster API to create clusters, Argo CD ApplicationSets to deliver applications to all of them, and Submariner to give those applications cross-cluster connectivity and service discovery. Each tool covers one layer, and the tools meet only at the edges.

10Submariner: Architecture and Components

Now to the connectivity layer. Submariner is made of a handful of small, well-defined parts.

Submariner is an open-source project in the Cloud Native Computing Foundation. It was started at Rancher Labs and grew with strong contributions from Red Hat and others. Its goal is simple to state: let Pods and Services in different clusters communicate directly, securely and with names, regardless of which CNI plugin or cloud each cluster uses.

flowchart LR
  subgraph A["Cluster East, Pod CIDR 10.1.0.0/16"]
    PA["Pod: frontend"] --> RA["Route Agent on every node"]
    RA --> GA["Gateway Engine, active"]
    LA["Lighthouse Agent and DNS plugin"]
  end
  subgraph B["Cluster West, Pod CIDR 10.2.0.0/16"]
    GB["Gateway Engine, active"] --> RB["Route Agent on every node"]
    RB --> PB["Pod: database"]
    LB["Lighthouse Agent and DNS plugin"]
  end
  GA |"IPsec or WireGuard tunnel"| GB
  BR["Broker: shares cluster, endpoint and service information"]
  GA -.-> BR
  GB -.-> BR
  LA -.-> BR
  LB -.-> BR
    
Figure 3. Main Submariner components in two clusters

The components

Component

Broker

A shared place where clusters publish information about themselves, such as their address ranges and gateway endpoints, and read the same about others. It is implemented with ordinary Kubernetes objects. It is not in the data path.

Component

Gateway Engine

Runs on one or more nodes designated as gateways. It builds the tunnels to the gateways of other clusters, and keeps them alive. One gateway is active and others wait as standbys.

Component

Route Agent

Runs on every node. It installs routes so that traffic for a remote cluster is sent towards the active gateway node, even if the sending Pod is on a different node.

Component

Globalnet

An optional component that lets clusters with overlapping address ranges still communicate, by giving workloads unique global addresses.

Component

Lighthouse

Cross-cluster service discovery. An agent exports and imports service information, and a DNS plugin answers queries for services that live in other clusters.

Component

Network plugin syncer and operator

Helpers that keep Submariner in tune with certain CNI plugins, and an operator that installs and upgrades the parts. A command line tool called subctl drives most setup and diagnosis.

i
Tip

Remember the pair: gateways build tunnels between clusters, route agents carry traffic from every node to the gateway. If traffic from one node works and from another does not, suspect the route agent. If no node works, suspect the tunnel.

11The Broker and the Join Process

How do two clusters that have never met learn to trust and find each other?

The broker is a noticeboard, not a road

Picture a community noticeboard in a town square. Each cluster pins a card saying “here are my address ranges, here is my gateway’s public address, here are the keys I use”. Other clusters read the cards. The noticeboard carries no traffic. If it burns down, the roads between towns still work, though no new cards can be posted or read until it is rebuilt.

Technically, the broker is a Kubernetes API endpoint with a few custom resource kinds installed, and with a service account and permissions that let each cluster read and write only what it should. It can be a dedicated small cluster, or it can be one of the member clusters. Every member must be able to reach its API.

Joining a cluster

1

Prepare

Check the address ranges of all clusters for overlap. Label the nodes that will act as gateways. Make sure the required firewall ports are open to those gateway nodes.

2

Deploy the broker

Run the deploy step against the broker cluster. It installs the shared resource kinds and creates a file of connection details that members will use.

3

Join each cluster

Run the join step against each member using the connection details. This installs the operator and the components, and gives the cluster a unique identifier.

4

Publish cluster information

Each cluster’s agents write its address ranges, gateway address and public key into the broker.

5

Discover peers

Each gateway reads the information about other clusters and learns where to connect.

6

Establish tunnels

Gateways build encrypted tunnels to each other. The route agents then program the nodes to use them.

7

Verify

Run the verification step, which tests connectivity and discovery between all pairs of clusters.

!
Common trap

The connection details file contains credentials to the broker. Treat it like a password. Anyone who obtains it can act as a member of the group of clusters, so store it securely and rotate it when people who handled it leave.

12The Gateway Engine, Tunnels and Gateway Failover

The gateways are the border crossings between clusters. They deserve the most attention in any design.

What a gateway does

A gateway node is an ordinary worker node that an administrator marks with a special label. The Gateway Engine runs there. It reads the broker to learn about other clusters, then builds a secure tunnel to the gateway of each one. A tunnel is a protected channel through which packets travel wrapped inside other packets, so that outsiders on the way see only unreadable traffic between two gateway addresses.

The choice of tunnel technology

Submariner calls the pluggable tunnel implementations cable drivers. Three kinds are available.

DriverEncrypted?StrengthsCautions
IPsec (through the Libreswan implementation)YesMature, widely trusted, long-time default, works through NATRuns partly in user space, throughput can be lower, CPU use higher
WireGuardYesModern, fast, small, simple key modelNeeds kernel support or a compatible module on gateway nodes
VXLANNoVery low overhead, simpleOnly for networks you already trust, such as a private link that is itself encrypted
!
Never do this

Do not use the unencrypted driver across the public internet. It is meant for links that are already private and protected. Everyone on the path could read or alter the traffic.

High availability with active and standby gateways

A cluster can have several gateway nodes, but only one is active at a time. The others are on standby. They use leader election, the same technique that keeps one scheduler active in a cluster, to choose the active one. If the active gateway fails, a standby wins the election and builds the tunnels. Traffic resumes after a short interruption, normally seconds. Gateways also check the health of the remote end of each tunnel, and report connection status and measured round-trip time.

stateDiagram-v2
  [*] --> Standby : gateway node starts
  Standby --> Active : wins leader election
  Active --> Standby : loses leadership or fails
  Active --> Connected : tunnels to peers are up
  Connected --> Degraded : peer unreachable or health check fails
  Degraded --> Connected : peer reachable again
    
Figure 4. The life of a gateway in a cluster

Network address translation and public addresses

In public clouds, a virtual machine often knows only its private address, while the world reaches it through a separate public address. The two gateways must learn each other’s reachable addresses. Submariner discovers and publishes a gateway’s public address through the broker. Tools in the command line client can also prepare cloud accounts by opening required ports and disabling checks that would otherwise drop forwarded packets. Even so, you should confirm the firewall and routing rules in each cloud, because they differ.

Sizing the gateway

All cross-cluster traffic passes through one active gateway per cluster. Choose a node type with strong network performance and enough CPU for encryption. Many problems blamed on Submariner turn out to be small gateway machines running out of CPU or bandwidth during busy periods.

Why only one gateway is active

It may seem wasteful to keep a standby machine idle. The reason is simplicity and safety. Two gateways both trying to own the same tunnel to the same remote cluster would fight over keys, routes and connection tracking state. Letting exactly one machine own the tunnel makes behaviour predictable, and a failover is a clean hand-over rather than a negotiation. The cost is that the throughput of one machine is the ceiling, which is why the gateway size matters so much.

What a failover looks like to an application

Imagine a client with a connection open across the tunnel when the active gateway dies. For a few seconds, packets vanish. The client’s operating system retransmits, and if the pause is short, the connection simply resumes once the new gateway is ready. If the pause is longer than the application’s timeout, the application sees an error and must reconnect. A well-built client treats this as normal weather. It retries with a small delay, spreads its retries randomly so that thousands of clients do not all return at the same instant, and gives up politely if the outage is long.

Choosing nodes for the gateway role

  • Dedicate them if you can. A node that only does gateway work will not be disturbed by a noisy application Pod.
  • Spread them across failure zones. Two gateways in the same rack or the same zone fail together during a zone outage.
  • Give them stable public or routable addresses. Changing addresses force the other side to learn the new address before the tunnel returns.
  • Keep them patched. They sit at the edge of your network, and encryption software deserves prompt security updates.

13The Route Agent and the Journey of a Packet

The tunnel is only the middle of the trip. Getting packets to and from it is the job of the route agent.

The gateway node is only one machine in the cluster. A Pod on any other node that wants to reach a remote Pod must first be sent to the gateway. The route agent running on every node installs the rules that make this happen. It creates a small overlay between nodes of the same cluster and routes for the remote clusters’ address ranges that point towards the active gateway. When the active gateway changes, the route agents update the rules.

sequenceDiagram
  autonumber
  participant P as Pod in East
  participant N as East worker node
  participant G1 as East gateway node
  participant G2 as West gateway node
  participant N2 as West worker node
  participant Q as Pod in West
  P->>N: Packet addressed to the West Pod
  N->>G1: Route agent rules forward it to the active gateway
  G1->>G2: Encrypt and send through the tunnel
  G2->>N2: Decrypt and route within West
  N2->>Q: Deliver to the destination Pod
  Q-->>P: Reply follows the reverse path
    
Figure 5. The path of one packet between two clusters

Step by step

1

The Pod sends a packet

Its destination address belongs to West. From the Pod’s point of view, it is just another address.

2

The node recognises a remote range

Routes installed by the route agent say that the West ranges are reached through the gateway node. If the Pod is already on the gateway node, this step is skipped.

3

The gateway wraps and encrypts

The packet enters the tunnel. Outside the tunnel, observers see only traffic between the two gateway addresses.

4

The remote gateway unwraps it

The packet has crossed the border and is again a normal packet inside West.

5

West routes it to the right node and Pod

The West route agent forwards it onward, and the West CNI delivers it.

6

The reply returns the same way

Connection tracking on the gateways ensures that replies are accepted and delivered.

Reaching a Service, not just a Pod

Submariner routes the Service address range as well, so a packet for a remote ClusterIP can cross the tunnel. At the remote gateway node, the ordinary kube-proxy rules for that cluster translate the ClusterIP into the address of one healthy backing Pod, just as for a local client. The remote cluster’s own load balancing therefore keeps working unchanged, which is elegant and means no new load balancer is needed.

i
Tip

Because the Service range must be routed too, both the Pod CIDRs and the Service CIDRs of the clusters must be non-overlapping when Globalnet is not used.

Why the packet does not simply leave from any node

A natural question is why every node does not hold its own tunnel to every remote cluster. With ten clusters and fifty nodes each, that would be thousands of tunnels, each with keys to rotate and health to monitor. Concentrating the work on a few gateways keeps the number of tunnels small and the security surface tight. The price is the extra hop inside the cluster from the ordinary node to the gateway node, which is usually well under a millisecond on a good local network.

What happens when the gateway moves

When the active gateway changes, the route agents on all nodes notice through the shared view of the cluster and rewrite their routes so that remote ranges now point at the new gateway. Existing connections may break, new connections work immediately after the update. This is another reason to keep timeouts short and retries sensible.

How this coexists with your CNI

Your CNI plugin remains in charge of Pod networking inside each cluster. The route agent adds rules next to it. Some network plugins need special handling because they manage routing tables in their own way. Submariner includes helper logic for several popular plugins, but you should always read the compatibility notes for your exact version and test a join in a lab before touching production.

14Globalnet: Connecting Clusters With Overlapping Addresses

When you cannot change the address plan, Globalnet adds a layer of translation.

The problem it solves

Suppose East and West were both built with the same Pod range. A packet addressed to a Pod in that range is ambiguous. Renumbering a running cluster is often impractical. Globalnet provides a way out by giving the workloads that need cross-cluster access an extra, unique address taken from a separate global range that all clusters agree on. By default this is a large private block, and each cluster receives its own slice of it.

flowchart LR
  P1["Pod A in East, real address in the shared range"] -->|"source rewritten"| E["East global egress address, unique"]
  E --> T["Tunnel between gateways"]
  T --> I["West global ingress address of the exported Service"]
  I -->|"destination rewritten"| S["Service in West, real address in the shared range"]
  S --> P2["Backing Pod in West"]
    
Figure 6. Globalnet rewrites addresses so overlapping clusters can still talk

How it works in plain words

  • When a Pod in East calls a service in West, its source address is rewritten to a unique global egress address as it leaves East.
  • Each exported service in West is given a unique global ingress address. The caller uses that address, found through discovery.
  • On arrival, West rewrites the destination from the global ingress address to the real service address inside West.
  • Replies are rewritten back the same way.

Trade-offs of using Globalnet

Benefits

  • Lets you connect clusters you cannot renumber.
  • Works with existing, running clusters.
  • Keeps default CNI and service ranges untouched.
  • Lets teams build clusters independently.

Costs

  • The remote side sees the global egress address, not the true Pod address, which complicates logging and policy.
  • Direct Pod-to-Pod connections are more limited than with plain routing. It is designed mainly for reaching exported services.
  • More rules to process, so slightly more latency and more to debug.
  • Another range to plan and keep unique.
!
Design advice

Treat Globalnet as a rescue, not a plan. If you are designing a new fleet, give every cluster unique ranges from the start. The simplest network is the one that needs no translation.

A worked picture

Say both East and West use 10.1.0.0/16 for Pods. The planners reserve a global range, and East is given a slice for its egress and ingress addresses, while West is given a different slice. A frontend Pod in East with real address 10.1.4.9 calls an exported service in West. West publishes the service’s global ingress address, say from its own slice. East’s gateway rewrites the source of the outgoing packet to an East global address. West’s gateway rewrites the destination to the real service address in West. The two clusters never need to understand each other’s real addresses, only the unique global ones.

Choosing between renumbering and Globalnet

QuestionRenumber clustersUse Globalnet
Effort nowHigh, usually means rebuilding clustersModerate, an extra component and a planned range
Effort over yearsLow once doneOngoing, every engineer must understand the translation
Source visibilityReal Pod address is seen by the remote sideGlobal address is seen instead
Risk during changeHigh, workloads must moveLower, changes are additive
Best forNew or small fleetsLarge, running fleets and acquisitions

15Lighthouse and the Multi-Cluster Services API

Connectivity is useless if applications cannot find each other. Lighthouse supplies the names.

A standard, not a private trick

The Kubernetes multicluster special interest group defined the Multi-Cluster Services API, often written MCS API. It adds two resource kinds that describe sharing services between clusters, and a shared DNS domain. Lighthouse is Submariner’s implementation of this standard, and other vendors, including major cloud providers, implement it too. That means skills and manifests carry over.

Resource

ServiceExport

Created in the cluster that owns a Service, with the same name and namespace. It says “please share this service with the group of clusters”.

Resource

ServiceImport

Created automatically in every cluster of the group. It represents the shared service as seen from that cluster, including which clusters provide it.

Domain

clusterset.local

The special DNS suffix for shared services, as opposed to cluster.local for local ones. A name such as orders.shop.svc.clusterset.local means the shared orders service in the shop namespace.

Principle

Namespace sameness

A namespace with the same name in different clusters is treated as the same namespace for sharing purposes, and services with the same name inside it are merged into one shared service.

sequenceDiagram
  autonumber
  participant App as Pod in East
  participant DNS as CoreDNS with Lighthouse plugin
  participant LH as Lighthouse data from the broker
  App->>DNS: Look up orders.shop.svc.clusterset.local
  DNS->>LH: Find the ServiceImport for orders in namespace shop
  LH-->>DNS: Providers are West and South
  DNS-->>App: Return one service address
  App->>App: Connect across the tunnel
    
Figure 7. How a shared service name is resolved

How the pieces fit

1

Export

An owner exports a Service by creating a ServiceExport, often with a single command from the client tool.

2

Publish

The Lighthouse agent in that cluster records the service in the broker.

3

Import

Agents in every other cluster read the broker and create local ServiceImport objects.

4

Resolve

When a Pod asks for a clusterset name, the cluster’s DNS server forwards the question to the Lighthouse plugin, which answers from the imported data.

Which cluster answers?

If the service exists in several clusters, Lighthouse spreads requests across them in turn. It also prefers a copy in the caller’s own cluster when one exists, which avoids paying for cross-cluster traffic when it is not needed. Callers can also name a particular cluster by putting its identifier in the name, which is useful for debugging or for sending traffic to a chosen region. For headless services, individual Pod names can be resolved with the cluster identifier in the name.

i
Good to know

Lighthouse does not move or copy your service. The workload stays where it runs. Only the name and the address mapping are shared. If a cluster goes down, the shared name can still be answered by the remaining clusters that export the service.

Headless services and individual Pods

A normal service gives callers a single address that hides the Pods behind it. A headless service instead lets the caller see each Pod, which stateful systems such as databases and message brokers rely on. The multi-cluster standard covers this case. Each Pod can be addressed using its own name together with the identifier of the cluster that owns it. This allows a database client to find the primary in one cluster and replicas in another, as long as the underlying network allows direct Pod access.

What happens when the same name exists in several clusters

The standard says that services with the same name and namespace across the group are treated as one logical service. This is powerful and risky in equal measure. It is powerful because the same application deployed in three regions becomes one name that works everywhere. It is risky because an accidental service with a common name, created by a different team in a different cluster, silently joins the group. Agree on naming rules, and review exports during change approval.

Consistency rules

  • Ports and protocols of same-named services should match, or the merged service becomes confusing.
  • Namespaces should be created consistently in all clusters that take part.
  • Delete the export when a service is retired, so that stale records do not send callers to a place that no longer answers.

16Data Flow and Lifecycle: A Complete Worked Journey

Put all the parts together with a concrete shop application.

The scene

An online shop runs its web frontend in cluster East. Its orders database runs in cluster West, for data residency reasons. The two clusters were planned with unique ranges.

ItemCluster EastCluster West
Pod range10.1.0.0/1610.2.0.0/16
Service range10.101.0.0/1610.102.0.0/16
WorkloadFrontend PodsService named orders in namespace shop, backed by database Pods
GatewayOne active, one standbyOne active, one standby

The story, step by step

1

The fleet is connected

The broker is running, both clusters have joined, the tunnels are up, and verification passes.

2

The database service is exported

The owner in West creates a ServiceExport for orders in the shop namespace. Within moments, East has a matching ServiceImport.

3

The frontend looks up the name

A frontend Pod asks for orders.shop.svc.clusterset.local. CoreDNS in East forwards the question to the Lighthouse plugin, which returns the West service address, say 10.102.5.20.

4

The packet leaves East

The Pod sends to 10.102.5.20. East’s route agent rules send it to the East gateway.

5

It crosses the tunnel

The East gateway encrypts and sends it. The West gateway receives and decrypts it.

6

West resolves the service address

kube-proxy on the West gateway node translates 10.102.5.20 into one database Pod, for example 10.2.3.7, and forwards the packet.

7

The reply returns

The database answers. The reply flows back through the same gateways and arrives at the frontend as if the database were next door.

What the application developer sees

Only a name. The frontend code uses a hostname for the orders service and an ordinary connection. All of the routing, tunnelling and translation happens underneath without any change to the application, which is the whole point of the design.

Day two: what the team does after launch

The first connection is the easy part. Real life is made of the days that follow. A new cluster is added, so someone must update the address registry and join it. A node image is upgraded, so gateway labels must survive the change. A certificate approaches its expiry date, so a rotation must be planned. A service changes its port, so the export and its consumers must be updated together. Each of these deserves a short written procedure and, ideally, automation that is tested in a staging fleet.

Questions a reviewer should ask

  • Which services cross clusters, and what is the business reason for each?
  • What happens to each of them if the link is down for ten minutes?
  • Who owns the broker, the gateways and the address registry?
  • How do we find out within minutes if a tunnel breaks?
  • How would we remove a cluster from the group cleanly?

17Prerequisites and Planning Before You Connect Clusters

Most of the work of a successful rollout happens before the first command is typed.

TopicWhat to decide or checkWhy it matters
Address rangesPod and Service ranges unique across all clusters, or plan for GlobalnetOverlap makes routing impossible and is hard to fix later
Gateway nodesAt least two per cluster, labelled, with good network and CPU capacityThey carry all cross-cluster traffic and provide failover
Firewall and security groupsAllow the tunnel ports between gateway nodes in both directions, and internal ports between nodesBlocked ports are the number one cause of tunnels that never come up
Public or private pathGateways reachable over the internet, a private link or a VPNAffects security, cost and latency
CNI pluginConfirm compatibility with your CNI and versionSupport differs among plugins and some need extra helpers
kube-proxy modeKnow whether you use iptables or IPVS or an eBPF replacementInteracts with the route and translation rules
Cloud settingsDisable source and destination checks on gateway machines where the cloud enforces themClouds drop forwarded packets by default
Broker locationA reachable, highly available cluster with controlled accessAll clusters need to read and write it
MTUPlan for tunnel overhead and set a consistent packet sizeWrong sizes cause mysterious failures with large packets
Time synchronisationClocks on gateway nodes in syncCertificates and key exchange can fail with clock drift
i
Tip

Write the address plan for the whole fleet in one shared document before creating any cluster, including ranges reserved for clusters you may create next year. It costs an afternoon and prevents months of rework.

A simple method for planning address ranges

Start by choosing one large private block that is not used anywhere in your offices, data centres or partner networks. Divide it in two halves. One half is for Pods, the other half for Services. Then divide each half by the maximum number of clusters you will ever plan to have, with generous headroom. For example, a company expecting up to 64 clusters might give each cluster a Pod range able to hold tens of thousands of Pods, and a smaller Service range, since a cluster usually has far fewer services than Pods. Record the plan in a table that every platform engineer can see, and let a person or a pipeline hand out ranges so two teams never receive the same one.

ClusterRegionPod rangeService rangeOwner
east-prod-1US East10.16.0.0/1610.208.0.0/20Platform team
west-prod-1US West10.17.0.0/1610.208.16.0/20Platform team
eu-prod-1Europe10.18.0.0/1610.208.32.0/20Platform team
spareReserved10.19.0.0/16 and onwards10.208.48.0/20 and onwardsUnassigned

Which ports must be open

The exact numbers depend on the driver and version, so read the documentation for your release. In general you need a pair of user datagram protocol ports between gateways for the tunnel, a port for the tunnel’s health checks, and ports for the internal overlay that connects ordinary nodes to the gateway. Allow them in cloud security groups, host firewalls and any hardware firewall between your sites. Use the narrowest rule that works, such as only the gateway addresses of known clusters.

18Trade-offs: What You Gain and What You Pay

Connecting clusters is powerful, but it changes the failure behaviour of your whole platform.

What you gain

  • Direct, private service-to-service calls across clusters, regions and clouds.
  • Resilience: a service can survive the loss of one whole cluster.
  • Freedom to place data and workloads where laws, cost or latency demand.
  • Gradual migrations, because old and new clusters can talk to each other.
  • Standard names that applications do not need to rewrite when the service moves.

What you pay

  • Added latency for every call that crosses a region.
  • Data transfer charges between regions and clouds, which can surprise finance teams.
  • A larger blast radius: a bad route or a broken gateway can affect several clusters.
  • More moving parts to monitor and upgrade.
  • Address planning and coordination between teams that used to work alone.
The network that joins your clusters becomes a dependency of every service that uses it. Treat it like a shared utility, not a convenience.

Analogy: a bridge between two towns

A bridge makes trade easy, and both towns grow. But now a traffic jam or a closed bridge affects both. The towns also have to agree on rules, tolls and maintenance. The bridge is worth building when the benefits clearly exceed the shared obligations.

Deciding whether you need multiple clusters at all

Before accepting these costs, ask whether a single cluster, possibly with stronger isolation through namespaces, quotas and network policies, would meet the goal. Many teams adopt multiple clusters for good reasons: limiting the blast radius of an upgrade, keeping regulated data in a region, serving users close to where they live, separating production from experiments, or surviving the loss of a whole region. Others adopt them by habit, and inherit the cost of coordination without any of the benefit. A useful test is to write down the specific failure or requirement that a second cluster solves. If the sentence is vague, wait.

The hidden people cost

Every extra cluster needs upgrades, security patches, capacity planning, access reviews and on-call attention. Joining clusters adds shared failure stories, such as a broken route affecting everyone. The team size and skills needed grow with the fleet. Budget for training, runbooks and rehearsals alongside the technology itself, because people are usually the scarcest resource in any platform effort.

19Performance: Latency, Throughput and MTU

Physics sets the floor. Configuration decides how far above it you land.

Latency

Light in fibre travels roughly 200 kilometres per millisecond. Two regions 4,000 kilometres apart have a floor of about 20 milliseconds each way, about 40 for a round trip, before any processing. The tunnel adds a little more through encryption and extra hops. A chatty application that makes thirty sequential calls across such a link will spend over a second just waiting. The most important performance decision is therefore which services talk across clusters at all.

Throughput

All traffic between a pair of clusters passes through one active gateway at each end. Its network card, its CPU, and its encryption speed set the ceiling. Lighter tunnels such as WireGuard commonly give better throughput than IPsec for the same hardware, though results depend on the kernel and the instance type. Always measure on your own machines, with the real packet sizes your applications use.

MTU, the silent troublemaker

The maximum transmission unit, or MTU, is the largest packet a link carries. A tunnel adds its own header, so inner packets must be smaller than normal. If sizes are not adjusted, small requests succeed while large responses stall, a pattern that looks like a random application bug. Check this early when a connection works for pings but hangs on bigger transfers.

~40 ms
Round trip across 4,000 km, minimum
1
Active gateway per cluster at a time
50–80 B
Typical tunnel header overhead, varies by driver
0
Application code changes required
i
Tip

Keep chatty conversations inside one cluster. Cross the border with coarse, infrequent requests, and use caching or local replicas for data that is read often.

Ways to reduce cost and delay

  • Cache. Store frequently read answers close to the caller, with an expiry that the business can accept.
  • Batch. One request that asks for fifty items beats fifty requests that ask for one.
  • Compress. Large text payloads shrink dramatically, saving both time and transfer charges.
  • Prefer local. Let the discovery layer favour a healthy local copy and use remote ones only as a fallback.
  • Replicate data, not calls. For read-heavy data, a replica in each region removes most cross-region traffic.
  • Pick regions wisely. Two regions in the same geography usually cost less and respond faster than two on different continents.

How to measure properly

Test with traffic that looks like the real thing. A single large file transfer shows the best-case bandwidth. A swarm of small requests shows the cost of per-packet processing. Measure both, measure during busy hours, and record the results so that you notice if a future upgrade changes them. Measure the gateway’s CPU during the test. If it is near its limit while the network card is not, encryption is the bottleneck and a faster driver or a larger machine will help.

20High Availability and Failure Modes

Everything breaks. A good design says in advance what happens when it does.

What failsWhat happensRecovery
Active gateway nodeCross-cluster traffic pauses brieflyStandby wins election and rebuilds tunnels, usually within seconds to a minute
All gateways in one clusterThat cluster is cut off from others; local work continuesRepair or replace gateways; applications should time out and retry
Broker cluster unavailableExisting tunnels and cached discovery data keep working; no new changes are sharedRestore the broker; clusters re-sync
Network link between regionsTunnels show as down; calls fail or time outDepends on the provider; consider a second path
Lighthouse DNS agentLocal service names stop resolving for shared servicesRestart or reschedule; cluster’s regular names unaffected
A whole remote clusterShared names resolve to other clusters that still export the serviceFail over automatically if other providers exist
Host cluster for KubeFedNo new propagation; members keep running what they haveRestore host cluster; it reconciles again

Design principles for failure

  • Fail local first. Every cluster must be able to serve its own users when all links are cut.
  • Use timeouts and retries. A call across clusters needs a short timeout so that a dead link does not hold a thread for minutes.
  • Avoid a hidden single point. Count the broker, the gateway pair and the DNS agent as dependencies when you draw the architecture.
  • Practise. Shut down a gateway during a quiet hour and watch what happens. Surprises are better found by you than by customers.
ADR-1Accepted
Decision

Each cluster must remain fully functional for its own users without any cross-cluster call on the critical path of a login or checkout.

Reason

Links between regions are less reliable than links inside one. Isolating the critical path limits the damage of a failed link.

Partial failures are the hardest

A cleanly dead link is easy to understand. Harder is a link that is half alive: packets are dropped at random, or one direction works while the other does not, or only big packets fail. Health checks may say the tunnel is up while real traffic suffers. For this reason, measure the success rate and latency of actual cross-cluster calls inside your applications as well as the health of the tunnel. The application’s own view is the final judge.

Avoiding a stampede on recovery

When a link returns after an outage, every client retries at once, and the freshly recovered service is flooded. Use exponential backoff with random jitter, limit concurrent retries, and consider a circuit breaker which stops calling a failing dependency for a short time. These patterns turn a dangerous surge into a gentle ramp.

Graceful removal of a cluster

To retire a cluster safely, first remove its exports so that other clusters stop sending it traffic. Wait until traffic has drained. Then disconnect the cluster from the group and finally delete it. Doing it in this order avoids sending customers to a place that is going away.

21Security Considerations

When clusters are joined, a weakness in one can become a weakness in all.

Encryption

Protect the tunnel

Use an encrypted driver whenever the path is not already private. Rotate keys and certificates on a schedule.

Access

Guard the broker

The broker holds the map of your fleet. Limit who can read and write it, use separate credentials per cluster, and audit changes.

Policy

Network policies still matter

Joining clusters does not remove the need for rules. Apply policies so that only intended callers reach an exported service.

Identity

Authenticate at the application layer

Do not trust an address alone. Use mutual TLS or tokens so a service knows who is calling, regardless of which cluster the call came from.

Scope

Export only what is needed

Every exported service is a door. Keep the list short, and review it as part of regular security work.

Federation

Limit the controller’s power

A federation controller that can write into every cluster is a very valuable target. Give it only the permissions it needs and protect its credentials carefully.

!
Common mistake

Assuming that private addresses mean safe traffic. Once clusters are connected, a compromised Pod in one cluster can attempt to reach services in another unless policies and identity checks say otherwise.

A least-privilege walk through

  1. List every component that writes into a cluster from outside it: the federation controller, the broker clients, the gateway engines.
  2. For each, give it a separate identity and only the permissions it truly needs, such as write access to a single namespace instead of the whole cluster.
  3. Store its credentials in a secret manager, rotate them regularly, and alert on use from unexpected places.
  4. Limit network access to the broker and the API servers to the addresses of known clusters.
  5. Log every change to exports, placements and cluster membership, and keep the logs outside the clusters themselves.

Compliance considerations

Auditors ask where data lives and who can reach it. Multi-cluster networking can make these questions harder, because traffic flows that used to stop at a cluster boundary now continue. Keep an up-to-date map of exported services and their consumers, document the encryption used between clusters, and show that regulated data is never exposed to a cluster outside the approved region. A clear diagram and an exports list are often the most persuasive evidence you can give.

22Monitoring and Troubleshooting

A calm, ordered checklist beats guessing every time.

What to watch

  • Tunnel status per remote cluster, and its round-trip time.
  • Gateway role changes. Frequent flips signal an unstable node or network.
  • Bytes sent and received through each tunnel, to find capacity limits and costs.
  • Lighthouse DNS query rates and failures.
  • For federation: the sync status of each federated resource in each member, and the age of the last successful sync.
  • Heartbeat or readiness of each member cluster from the host’s point of view.
flowchart TD
  A["Cross-cluster call fails"] --> B{"Does the name resolve?"}
  B -->|"No"| C["Check ServiceExport and ServiceImport, then the DNS agent and CoreDNS forwarding"]
  B -->|"Yes"| D{"Is the tunnel connected?"}
  D -->|"No"| E["Check gateway pods, firewall ports, public addresses, keys and time"]
  D -->|"Yes"| F{"Do small packets work but large ones hang?"}
  F -->|"Yes"| G["Check MTU and tunnel overhead"]
  F -->|"No"| H{"Does the remote service have healthy endpoints?"}
  H -->|"No"| I["Fix the workload in the remote cluster"]
  H -->|"Yes"| J["Check network policies, address overlap and Globalnet rules"]
    
Figure 8. A troubleshooting path from symptom to cause

The order of questions

1

Is the connection healthy?

Use the client tool’s show and verify commands. They report gateways, connections and run built-in tests between clusters.

2

Can Pod reach Pod by address?

Test the raw network first, without names. This separates routing problems from naming problems.

3

Does the name resolve?

Ask for the clusterset name from inside a Pod. If this fails while step 2 passes, the issue is in discovery.

4

Does the application behave?

Only after the network is proven, look at timeouts, retries, certificates and the service itself.

Signals worth alerting on

SignalWhat it suggestsFirst action
Tunnel status not connected for several minutesFirewall, address or key problem, or a remote outageCheck gateway logs on both sides and the ports between them
Gateway role changes many times an hourUnstable node, resource starvation or flapping networkInspect node health and move the role to a steadier node
Round-trip time rises sharplyCongestion or a longer path chosen by the providerCompare with provider status and traffic volume
Imports missing in a clusterLighthouse agent cannot read the brokerCheck credentials and reachability of the broker
Federated resource stuck in not-synced stateMember cluster unreachable or the resource is rejected thereRead the status conditions on the federated object
DNS failures for clusterset names onlyForwarding or plugin configuration issueTest resolution from a debug Pod and inspect CoreDNS logs

Habits that save hours

Keep a small debug Pod image with network tools ready in every cluster. Save the verification command output after a healthy rollout, so that you can compare it when something breaks. Document known quirks of your cloud providers. And always write the incident notes: a team that records what it learned from each outage gets steadily calmer.

23Patterns and Anti-Patterns

Learn from the mistakes other teams already made.

Patterns that work

  • Plan one address registry for the entire organisation.
  • Keep a small number of well-chosen shared services.
  • Prefer a local copy of a service and fall back to remote ones.
  • Use declarative workflows (GitOps) to push the same configuration to many clusters.
  • Use separate small clusters per team or region, joined by a clear network contract.
  • Test failover on a calendar, not just in theory.

Anti-patterns

  • Letting every service call every other service in every cluster.
  • Using Globalnet everywhere to avoid address planning.
  • Placing a chatty database client and its database in different regions.
  • Running gateways on tiny, shared or spot nodes.
  • Treating federation as a magic switch that fixes data consistency across clusters.
  • Skipping timeouts because the call usually works.

A cautionary tale

A team stretched one application across two continents and had its web tier call a database in the other region on every page view. Pages that had taken 80 milliseconds now took over a second, and a transatlantic data bill arrived. The fix was to keep a read replica in each region and send only writes across the link. The network was never the problem. The placement was.

Governance: who decides what is shared

Technology makes sharing easy, so rules must make it deliberate. A good practice is a lightweight review for each new export. The owner explains who will call the service, what data it carries, how it behaves under load, and what the callers should do when it is unavailable. Approved exports are recorded in a catalogue. This is not bureaucracy for its own sake. It prevents the quiet growth of a tangled web of dependencies that nobody understands.

Signs that the design is drifting

  • Nobody can draw the list of cross-cluster dependencies from memory.
  • An outage in one cluster surprises owners of services in another.
  • Data transfer charges grow faster than traffic from users.
  • New clusters are created by copying old ones without checking address ranges.

24Best Practices and a Rollout Checklist

A short, ordered list you can print and follow.

1

Write down why

Name the business reason: resilience, residency, migration or scale. If a single larger cluster would solve the problem, choose that. Fewer clusters are easier to run.

2

Plan addresses for the whole organisation

Allocate unique Pod and Service ranges, and a global range if Globalnet may be needed one day.

3

Choose the layers separately

Decide on a network layer for connectivity and discovery. Then decide on a control layer for deployment, which may be a GitOps tool or a modern multi-cluster manager rather than KubeFed.

4

Prepare gateways and firewalls

Label at least two strong nodes per cluster, open the required ports, and check cloud forwarding settings.

5

Start with two non-production clusters

Join them, run the built-in verification, export one harmless service and call it. Learn the failure behaviour by breaking things on purpose.

6

Add timeouts, retries and policies

Make applications tolerate slow or missing remote calls, and restrict who may reach exported services.

7

Build dashboards and alerts

Tunnel status, gateway flips, traffic volume, DNS failures and sync lag. Alert before users notice.

8

Roll out gradually and rehearse upgrades

Add clusters one at a time. Upgrade the network components in one cluster first, watch, then continue. Keep versions within the supported skew.

Upgrades and version management

Network components in a fleet must keep rough agreement with one another. Read the release notes for supported version combinations between the broker, the gateways, the route agents and the discovery components. Upgrade one cluster at a time. Start with a non-production cluster, run the verification tests, watch graphs for a day, and only then repeat in production. Keep the previous version’s installation instructions handy so you can roll back. Upgrades of Kubernetes itself, of the network plugin and of the operating system on gateway nodes should be treated as events that can break the connection, and verified afterwards.

Documentation that pays for itself

  • A one-page diagram of clusters, gateways, brokers and links.
  • The address registry, with owners.
  • The list of exported services and their callers.
  • A runbook for each failure in the table of failure modes.
  • The contact details of every team that depends on the shared services.

25A Worked Example With Numbers

Capacity thinking turns vague worry into a clear decision.

The situation

A company runs an orders service in West and a recommendations service in East. East calls West for each product page view. At peak there are 2,000 page views per second. Each call sends 2 kilobytes and receives 18 kilobytes. The round-trip time between the regions is 35 milliseconds.

The arithmetic

QuestionCalculationResult
Traffic per second2,000 calls × (2 KB + 18 KB)40,000 KB, about 40 MB per second
In bits40 MB × 8about 320 megabits per second
Added latency per pageOne call × 35 ms round trip35 ms added to each page view
Monthly transfer40 MB × 86,400 s × 30 days at constant peak (upper bound)about 100 terabytes
Realistic averageAssume average is 30% of the peakabout 30 terabytes per month

What the numbers tell us

  • 320 megabits per second at peak is fine for a gateway on a modern instance, but encryption CPU must be watched. If the gateway nodes are small, they will saturate first.
  • 35 milliseconds per page is acceptable if there is one call. If the page makes five sequential calls, 175 milliseconds is noticeable.
  • Thirty terabytes a month of cross-region transfer may be a significant bill. Ask finance for the provider’s rate before approving the design.

The improvement

The team caches popular product data in East for 60 seconds, removing about 90 percent of the calls. Traffic falls to about 4 MB per second, around 32 megabits, and the average page view stops waiting on the link. The monthly transfer drops to a few terabytes. The network design is unchanged. The application simply stopped crossing the border when it did not have to.

i
Lesson

The cheapest cross-cluster call is the one you do not make. Multi-cluster networking enables a call. Good architecture decides whether to make it.

Checking the gateway capacity

Suppose the gateway machine can encrypt about 1.5 gigabits per second before its processors saturate. At 320 megabits per second, the original design uses roughly one fifth of that. That leaves comfortable room for growth, perhaps four times more traffic, before action is needed. If the company expects the page views to triple next year, the same machine still has room. The team writes the number 1.5 gigabits into the capacity plan, with a note to retest after each major upgrade, and sets an alert at 60 percent of that figure so there is time to act.

26Real-World Scenarios

Where teams actually use these ideas, described in general terms.

Resilience

Active-active across regions

An e-commerce company runs the same application in two regions. Shared service names let each region fall back to the other for a dependency that is down.

Residency

Data stays in country

A bank keeps customer databases in the home country, while frontends run in other regions. Only well-defined services are exported across the border.

Migration

Moving between clouds

A media company moves services one by one from an old cluster to a new cloud. Old and new talk to each other during the transition, so no big-bang cut-over is needed.

Mergers

Joining two companies

After an acquisition, two engineering teams with clashing address plans use Globalnet to connect their clusters before a long-term clean-up.

Edge

Many small sites

A retailer runs a small cluster in each store region. Shared services from a central cluster are reached by name, and configuration is pushed by a GitOps tool.

Isolation

Cluster per team or environment

Platform teams give each team its own cluster for safety, then export a few shared platform services such as logging and identity.

i
Note

These scenarios are typical patterns rather than reports about named companies. Check current case studies from the project communities and your vendors before quoting any in your own material.

Three short stories

The regional failover that worked

A travel booking platform exported its pricing service from three regions. During a regional cloud incident, the discovery layer kept answering with the two healthy regions. Customers saw a small increase in response time, and no one needed to change a single setting. The team had practised the failure two months earlier, and the runbook was fresh.

The surprise bill

A data analytics team exported a large reporting service and invited several teams to use it. A batch job in another region began downloading gigabytes every hour. No one was watching the transfer graph, and the first sign of trouble was the monthly invoice. Afterwards, the platform team added traffic dashboards, per-team quotas on the heaviest exports, and a review step for new consumers.

The overlap that almost blocked a merger

Two companies joined, and both had used the same default Pod range in every cluster. Renumbering would have taken a year. Using Globalnet, engineers connected a handful of important services within weeks, and then slowly moved workloads to a clean address plan in the background. The temporary solution became a bridge to the permanent one.

27Glossary of Terms

TermMeaning in plain words
Multi-clusterRunning more than one Kubernetes cluster as part of one overall system
Control plane (of a fleet)The part that decides what runs where across clusters
Data plane (of a fleet)The part that actually carries network traffic between clusters
KubeFedA project that pushed the same resources to many clusters from one host cluster
Host clusterThe cluster that runs the federation controllers
Member clusterA cluster managed by the federation
Template, placement, overridesWhat to deploy, where to deploy it, and how it differs per cluster
SubmarinerA project that connects the networks of clusters and shares service discovery
BrokerA shared meeting point where clusters publish and read information about each other
Gateway engineThe component on a gateway node that builds tunnels to other clusters
Route agentA per-node component that sends cross-cluster traffic to the active gateway
TunnelA protected channel in which packets travel wrapped inside other packets
Cable driverA pluggable tunnel technology such as IPsec, WireGuard or VXLAN
CIDRA compact way to write a range of network addresses
GlobalnetA feature that gives workloads unique global addresses so overlapping clusters can connect
LighthouseSubmariner’s service discovery component, implementing the multi-cluster services API
ServiceExportA request to share a Service with other clusters
ServiceImportThe local representation of a Service shared by other clusters
clusterset.localThe DNS domain for services shared across a group of clusters
MTUThe largest packet size a network link carries
Leader electionA method for a group to pick one member to act as the active one
GitOpsManaging deployments from configuration stored in version control, applied automatically to clusters

28Frequently Asked Questions

Q1Do I need both Submariner and KubeFed?

No. They solve different problems. Submariner connects networks and shares service names. KubeFed-style tools deploy configuration to many clusters. You can use either alone, or pair the network layer with a different deployment tool.

Q2Is KubeFed still a good choice for a new project?

Check its current status first. The project did not progress beyond beta, and community activity has been reported as archived or reduced. Many teams now choose newer multi-cluster managers or GitOps tools for the deployment side.

Q3Can clusters with the same Pod range be connected?

Yes, with Globalnet, within its limits. Unique ranges remain the simplest and preferred choice.

Q4Does Submariner replace my CNI plugin?

No. Your CNI continues to handle networking inside each cluster. Submariner adds routes and tunnels between clusters, working alongside it.

Q5Is cross-cluster traffic encrypted?

It is when you use an encrypted driver such as IPsec or WireGuard. The plain VXLAN option is not encrypted and should be used only over links that are already protected.

Q6What happens if the broker goes down?

Existing tunnels and previously learned information keep working. New changes are not shared until the broker returns.

Q7How many clusters can I connect?

It depends on version and design, since every gateway keeps tunnels to the others. Check the project’s documented limits and test your own scale before committing.

Q8Do I need to change my application code?

Usually only the hostname it calls. Applications should also handle slower calls and failures sensibly, but no new protocols are required.

Q9What is the difference between a ClusterIP service and a clusterset service?

A ClusterIP service is reachable inside one cluster under cluster.local. An exported service is also reachable from other clusters in the group under clusterset.local.

Q10Can I use a service mesh instead?

Yes, several meshes offer multi-cluster modes with their own discovery and identity. Choose by how much of the mesh you want to adopt. A simple network layer suffices if you only need connectivity and names.

Q11Why do large requests hang while small ones work?

Usually an MTU mismatch. The tunnel’s overhead makes large packets too big. Lower the packet size or adjust settings so they fit.

Q12Does multi-cluster networking give me disaster recovery?

It gives you the connection that disaster recovery needs. You still have to replicate data, run copies of the services, and test failover.

29Summary and Key Takeaways

What to remember

  • Two layers, two jobs. The control plane decides what runs where. The data plane carries the packets. Do not expect one tool to do both well.
  • KubeFed pushes configuration. A host cluster sends templates, placement and overrides to member clusters. It never moved past beta, so confirm its status before adopting it and consider modern alternatives.
  • Submariner connects networks. Gateways build encrypted tunnels, route agents steer traffic, and the broker shares facts about the fleet.
  • Plan addresses first. Unique Pod and Service ranges keep everything simple. Globalnet rescues overlapping clusters at the cost of extra complexity.
  • Lighthouse gives names. ServiceExport and ServiceImport, with clusterset.local, let applications find shared services by a stable name.
  • The border has a price. Every cross-cluster call adds latency and can add data charges. Keep chatty traffic local and cross with coarse requests.
  • Design for failure. Every cluster should work alone. Use timeouts, standby gateways and rehearsed failover.
  • Secure the join. Encrypt tunnels, protect the broker, apply policies, and authenticate at the application layer.