How do you connect services across two Kubernetes clusters?
AdvancedScenarioKubernetes Networking
Answer
Situation read → Options range from simple DNS to full multi-cluster meshes.
What I'd do →
- Simple: expose services through internal load balancers and private DNS names
- Network-level: non-overlapping pod CIDRs plus routing (TGW, peering) or Cilium Cluster Mesh
- Service-level: Istio multi-cluster or the Multi-Cluster Services API (
ServiceExport) - Keep identity consistent with shared root CA
- Test failover by killing a cluster's endpoints
Why → Cross-cluster calls multiply failure modes, so start with the simplest path that meets the requirement.
Interview tip → Say overlapping pod CIDRs are why you plan before the first cluster.
More on Kubernetes Networking
Explain the Kubernetes networking model in one minute.BeginnerClusterIP, NodePort and LoadBalancer: when do you use each?BeginnerHow does a pod find another service by name?BeginnerService versus Ingress: what is the difference?BeginnerWhat does a CNI plugin do and which ones do you know?BeginnerHow do you reach a pod from your laptop for debugging without exposing it?Beginner