Kubernetes Multi-Cluster Setup: Active-Passive vs Active-Active

Listen to this Post

When designing a Kubernetes multi-cluster architecture, the choice between active-passive and active-active setups depends on cost, complexity, and fault tolerance requirements.

Active-Passive Setup

  • Lower cost: Only one cluster handles traffic; the passive cluster remains idle until failover.
  • Simpler implementation: Reduced synchronization complexity.
  • Easier debugging: Fewer moving parts mean quicker issue resolution.

Active-Active Setup

  • True high availability (HA): Traffic distributes across multiple clusters.
  • Higher fault tolerance: No single point of failure.
  • Complex & costly: Requires advanced networking (e.g., global load balancers) and data synchronization.

You Should Know:

Commands & Steps for Active-Passive Setup

1. Cluster Setup

 Deploy primary cluster 
kops create cluster --name=primary.example.com --zones=us-east-1a 
kops update cluster --name=primary.example.com --yes

Deploy standby cluster 
kops create cluster --name=standby.example.com --zones=us-west-1a 
kops update cluster --name=standby.example.com --yes 

2. Configure DNS Failover (AWS Route 53 Example)

aws route53 change-resource-record-sets --hosted-zone-id Z1PA6795 --change-batch '{ 
"Changes": [{ 
"Action": "CREATE", 
"ResourceRecordSet": { 
"Name": "app.example.com", 
"Type": "A", 
"SetIdentifier": "Primary", 
"Failover": "PRIMARY", 
"AliasTarget": { 
"HostedZoneId": "Z3AADJGX6KTTL2", 
"DNSName": "primary-elb.example.com", 
"EvaluateTargetHealth": true 
} 
} 
}] 
}' 
  1. Sync Persistent Data (Using RDS Multi-AZ or Volume Replication)
    Example: Using Velero for backup/restore 
    velero backup create primary-backup --include-namespaces=production 
    velero restore create --from-backup primary-backup 
    

Commands & Steps for Active-Active Setup

1. Global Load Balancer (Using Istio Multi-Cluster Mesh)

 Install Istio with multi-cluster support 
istioctl install --set profile=default --set values.global.meshID=mesh1

Configure cross-cluster service discovery 
kubectl --context=cluster1 apply -f istio-crosscluster-gateway.yaml 

2. Database Synchronization (CockroachDB Example)

cockroach start --locality=region=us-east --join=cluster1,cluster2 

What Undercode Say

For cost-sensitive and moderate-HA needs, active-passive is optimal. Use active-active only for zero-downtime-critical systems.

Expected Output:

  • Active-Passive: Lower cost, easier maintenance.
  • Active-Active: Maximum uptime, higher complexity.

Related Resources:

References:

Reported By: Nagavamsi When – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅

Join Our Cyber World:

💬 Whatsapp | 💬 TelegramFeatured Image