kubernetes/kops · error
cluster cannot span multiple regions (found zone %q, but reg
Error message
cluster cannot span multiple regions (found zone %q, but region is %q)
What it means
FindRegion ensures all cluster subnets lie within a single Hetzner region (kOps Hetzner clusters cannot span regions). If a subnet's zone maps to a different region than previously seen, it aborts with this error naming the offending zone and the already-established region.
Source
Thrown at upup/pkg/fi/cloudup/hetzner/utils.go:43
// FindRegion determines the region from the zones specified in the cluster
func FindRegion(cluster *kops.Cluster) (string, error) {
var region string
for _, subnet := range cluster.Spec.Networking.Subnets {
var zoneRegion string
switch subnet.Zone {
case "fsn1", "nbg1", "hel1":
zoneRegion = "eu-central"
case "ash":
zoneRegion = "us-east"
case "hil":
zoneRegion = "us-west"
default:
return "", fmt.Errorf("unknown zone %q for hetzner cloud, known zones are fsn1, nbg1, hel1, ash, hil", subnet.Zone)
}
if region != "" && zoneRegion != region {
return "", fmt.Errorf("cluster cannot span multiple regions (found zone %q, but region is %q)", subnet.Zone, region)
}
region = zoneRegion
}
return region, nil
}
View on GitHub (pinned to 4c8573c808)
Solutions
- Make all subnets use zones in the same region (fsn1/nbg1 are both eu-central; ash/hil are both us-east... check: ash=us-east, hil=us-west so pick one).
- Remove or re-zone the offending subnet via `kops edit cluster`, then `kops update cluster`.
- If multi-region is truly required, create separate clusters per region.
Example fix
// before zones: [fsn1, ash] // after zones: [fsn1, nbg1]
Defensive patterns
Strategy: validation
Validate before calling
zoneRegion := map[string]string{"fsn1":"eu-central","nbg1":"eu-central","hel1":"eu-central","ash":"us-east","hil":"us-west"}
regions := map[string]bool{}
for _, s := range subnets { regions[zoneRegion[s.Zone]] = true }
if len(regions) > 1 { return fmt.Errorf("subnets span multiple regions: %v", regions) } Prevention
- Keep all cluster zones within one Hetzner region (fsn1/nbg1/hel1 or ash or hil).
- Plan multi-region availability as separate clusters.
- Check zone-to-region mapping before adding subnets.
When it happens
Trigger: Cluster defines subnets in zones from multiple regions, e.g. fsn1 (eu-central) plus ash (us-east), or hel1 with nbg1.
Common situations: Adding a subnet in a new geographic zone for HA without realizing cross-region isn't supported; copy-pasting a multi-region cluster spec from AWS/GCP.
Related errors
- unknown zone %q for hetzner cloud, known zones are fsn1, nbg
- failed to get private networks from hetzner cloud metadata:
- failed to convert private networks to object: %w
- could not find public subnet in zone: %q
- found multiple public subnets in zone: %q
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/e7ac7f2ace363fcb.
Report an issue: GitHub.