Google Cloud — GKE Microservices with Managed Data
A Kubernetes cluster on GKE with its namespaces drawn as real containers, an ingress terminating outside traffic, and the stateful half deliberately outside the cluster in managed services. Reports clean. The pattern worth copying is that last part: the databases are managed, not StatefulSets, and the diagram makes that visible.
Make it your own.
title "Storefront on GKE"
provider gcp
internet {
user shoppers "Shoppers"
}
cloud proj "acme-storefront" {
region europe-west1 {
load-balancing glb "Global load balancer"
cloud-armor armor "WAF policy"
network vpc "Storefront VPC" cidr 10.20.0.0/16 {
cluster gke-main "GKE cluster" {
namespace edge "edge" {
ingress ing "Ingress controller"
}
namespace shop "shop" {
k8s:deployment web "Storefront" count 4 tier web
k8s:deployment cart "Cart service" count 3 tier api
k8s:deployment search "Search service" count 2 tier api
}
namespace ops "ops" {
k8s:deployment metrics "Metrics collector"
}
}
}
cloud-sql orders "Orders database"
memorystore cache "Session cache"
cloud-storage media "Product media"
pubsub events "Domain events"
}
}
shoppers -> armor : https 443
armor -> glb : https 443
glb -> ing : https 443
ing -> web : http 8080
web -> cart : grpc 9000
web -> search : grpc 9000
cart -> orders : postgres 5432
cart -> cache : redis 6379
web => media : object read
cart ~> events : cart events
metrics ..> web
metrics ..> cart