Kubernetes Multi-Cluster deployments with GKE
Kishore Jagannath,
Strategic Cloud Engineer in Google,
kishorerj.medium.com
Agenda
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.
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
Challenges
Multi Cluster in GKE
gcloud container fleet memberships register MEMBERSHIP_NAME --gke-uri=GKE_URI --enable-workload-identity
Namespace sameness
Identity Sameness
Service Sameness
Multi Cluster architectural Patterns
Multi-cluster architecture(contd)
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
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.
Demo