1 of 11

Kubernetes Multi-Cluster deployments with GKE

Kishore Jagannath,

Strategic Cloud Engineer in Google,

kishorerj.medium.com

2 of 11

Agenda

  • Introduction to GKE Cluster
  • Multi cluster motivation and challenges
  • Multi cluster architectures
  • Inter cluster communication with Service Export
  • Load balancing services across clusters with Multicluster Ingress
  • Demo

3 of 11

GKE Cluster

A GKE cluster consists of Control Plane and Data Plane. Clusters can be either zonal or regional

Control Plane

Managed by GCP and consists of all kubernetes components

Data Plane

Consists of worker nodes, which runs users application specific pods and other kubernetes resources.

4 of 11

Motivation

Availability:

Spreading clusters across regions provides better disaster recovery. Workloads are shielded from cluster failures

Location:

Place location specific workloads in specific regions for compliance, latency and Data gravity etc.

Scalability:

Operate beyond the scalability limits of a single cluster in GCP

Isolation:

Isolate different environments, support cluster per tenant model, workloads sensitive to upgrades

5 of 11

Challenges

  • Overhead of Managing multiple clusters instead of single cluster
  • Facilitate east-west communication of services across multiple clusters.
  • Scale services across multiple clusters.
  • Facilitate north-south external communication of services across multiple clusters.

6 of 11

Multi Cluster in GKE

gcloud container fleet memberships register MEMBERSHIP_NAME --gke-uri=GKE_URI --enable-workload-identity

Namespace sameness

Identity Sameness

Service Sameness

7 of 11

Multi Cluster architectural Patterns

8 of 11

Multi-cluster architecture(contd)

9 of 11

Multi Cluster Services

Facilitates east west communication between dependant services.

Clusters belonging to same fleet can export services.

Exported services becomes available to all clusters within Fleet.

Single VIP across fleet

Pods can invoke dependant services across cluster boundaries via implicitly created Service Import.

DNS: SERVICE_EXPORT_NAME.NAMESPACE.svc.clusterset.local

10 of 11

Multi-cluster Ingress

Multiple clusters added to a fleet.One of the cluster is a config cluster.

Config cluster hosts the MultiClusterServices and MultiClusterIngress objects

MulticlusterService creates a copy of the service across all clusters registered to Fleet, can be restricted with links.

MultiClusterIngress creates a Global GCP based LB.

11 of 11

Demo