Multi-zone GKE clusters paying for cross-zone traffic, a planned check with no findings yet
What does ZopNight detect here?
Google Cloud charges $0.01 per GiB for VM-to-VM traffic between zones of the same region, and GKE nodes count as VMs. ZopNight has a planned check for GKE clusters spread across more than one zone that raises no findings today; it will treat 30% of billed inter-zone transfer as avoidable once that cost can be separated.
Signal and threshold
| Field | Value |
|---|---|
| Rule IDs | RC-123 |
| Category | rightsizing |
| Severity | low |
| Metric | none — pure configuration read |
| Threshold | cluster nodes in more than 1 zone |
| Source | ZopNight |
| Permissions used | container.clusters.list · container.clusters.get · container.services.list |
Where it applies
Zone hops are metered traffic
VPC network pricing charges nothing for traffic inside a zone on internal addresses, but $0.01 per GiB for data sent to a different zone in the same region. The cost is billed to the project of the sending VM, and Google names GKE nodes among the VMs this applies to.
A regional or multi-zonal cluster spreads pods across zones for resilience. By default a Kubernetes Service sends traffic evenly to all endpoints, so in a three-zone cluster roughly two of every three calls between services leave the caller’s zone. Chatty microservices turn that into a steady line item.
Checking zones and service routing
gcloud container clusters list --format="table(name,location,locations.list())"kubectl get services -A -o custom-columns=NS:.metadata.namespace,NAME:.metadata.name,TD:.spec.trafficDistributionlocations is the list of zones that hold the cluster’s nodes. An empty traffic distribution
column means the Service uses the default even spread.
What qualifies a cluster
The cluster must have nodes in more than one zone. Single-zone clusters, or clusters whose zone count ZopNight could not read, are skipped. This is a planned check: today it raises no finding on any cluster, as explained below.
When no saving is shown
Only billed inter-zone transfer is a defensible base. The cluster’s compute cost says nothing about how much traffic crosses zones, so ZopNight does not apply a fraction to it. ZopNight cannot yet separate billed inter-zone transfer from other Compute Engine charges, so for now the rule stays silent on every cluster. Use the commands above and your billing export to size it by hand.
The 30% reduction factor
Once billed inter-zone transfer can be separated, the planned saving is:
saving = billed inter-zone transfer cost x 0.30The factor is conservative on purpose: a highly available cluster still needs some traffic to cross zones.
Keeping calls inside their zone
- On each high-traffic Service set
spec.trafficDistribution: PreferSameZone, described in the Kubernetes virtual IPs reference, or the olderservice.kubernetes.io/topology-mode: Autoannotation. - Make sure each zone has enough endpoints; with none available locally, traffic falls back to the whole cluster.
- Use pod affinity to keep tightly coupled workloads together, and topology spread constraints to keep replicas balanced across zones.
- Measure inter-zone transfer in billing before and after the change.