OpsCanary
kubernetesmulti clusterPractitioner

Federating Kubernetes Clusters for Zero-Downtime Deployments

5 min read CNCF BlogJul 27, 2026Reviewed for accuracy
Share
PractitionerHands-on experience recommended

In today's fast-paced development environment, ensuring zero downtime during deployments is critical. Federating Kubernetes clusters allows you to present services as a single, load-balanced endpoint, minimizing the risk of service disruption. This is where Linkerd’s multicluster extension shines, enabling seamless traffic management across multiple clusters.

Linkerd supports three modes for cluster federation: hierarchical (gateway), flat (pod-to-pod), and federated. You can choose the mode per service using a label. Hierarchical mirroring works on any network, while flat and federated modes require real pod-to-pod connectivity. For instance, on GCP, VPC-native GKE clusters on peered VPCs provide the necessary flat network configuration. Setting this up involves provisioning three GKE clusters with VPC peering, installing Linkerd with a shared trust anchor, and creating a full-mesh link topology between the clusters. Key parameters include setting the region and zone for each cluster and defining the machine type and node count.

In production, be aware of critical gotchas. Non-overlapping CIDR ranges are essential; overlapping ranges can lead to silent routing failures. Additionally, when configuring your clusters, remember that GKE regional clusters default to spreading nodes across three zones. If you only want a single node per cluster, specify the node count carefully to avoid unnecessary costs. This setup can be done in about 30 minutes with the right prerequisites, including a GCP account and the necessary CLI tools.

Key takeaways

  • Utilize Linkerd’s multicluster extension to achieve zero-downtime deployments.
  • Choose between hierarchical, flat, or federated modes based on your network setup.
  • Ensure non-overlapping CIDR ranges to prevent routing issues across peered VPCs.
  • Limit node counts in GKE clusters to avoid unnecessary costs.
  • Set up a shared trust anchor for secure communication between clusters.

Why it matters

In production, the ability to deploy updates without downtime can significantly enhance user experience and system reliability. Federating clusters allows for better load balancing and fault tolerance, which are crucial for maintaining service availability.

Code examples

Bash
1export GCP_PROJECT="your-project-id"
2
3export REGION_WEST="us-central1"
4export REGION_EAST="us-east1"
5export REGION_NORTH="europe-west1"
6
7export ZONE_WEST="us-central1-a"
8export ZONE_EAST="us-east1-b"
9export ZONE_NORTH="europe-west1-b"
10
11export CLUSTER_MACHINE_TYPE="e2-medium"
12export CLUSTER_NODE_COUNT="1"
13export FRONTEND_REPLICAS="3"
Bash
linkerd --context west multicluster install --gateway=false \
  --set controllers[0].link.ref.name=east \
  --set controllers[1].link.ref.name=north \
  --set controllers[2].link.ref.name=east-gw \
  | kubectl --context west apply -f -
Bash
./scripts/01-infra.sh

When NOT to use this

The official docs don't call out specific anti-patterns here. Use your judgment based on your scale and requirements.

Want the complete reference?

Read official docs

Test what you just learned

Quiz questions written from this article

Take the quiz →
Better StackSponsor

Unified observability — logs, uptime monitoring, and on-call in one place. Used by 50,000+ engineering teams to ship faster and sleep better.

Try Better Stack free →

Get the daily digest

One email. 5 articles. Every morning.

No spam. Unsubscribe anytime.