{"record":{"id":"d99ecf041c347644","repo":"kubernetes/kops","slug":"unknown-zone-q-for-hetzner-cloud-known-zones-are","errorCode":null,"errorMessage":"unknown zone %q for hetzner cloud, known zones are fsn1, nbg1, hel1, ash, hil","messagePattern":"unknown zone %q for hetzner cloud, known zones are fsn1, nbg1, hel1, ash, hil","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/hetzner/utils.go","lineNumber":39,"sourceCode":"\n\t\"k8s.io/kops/pkg/apis/kops\"\n)\n\n// FindRegion determines the region from the zones specified in the cluster\nfunc FindRegion(cluster *kops.Cluster) (string, error) {\n\tvar region string\n\n\tfor _, subnet := range cluster.Spec.Networking.Subnets {\n\t\tvar zoneRegion string\n\t\tswitch subnet.Zone {\n\t\tcase \"fsn1\", \"nbg1\", \"hel1\":\n\t\t\tzoneRegion = \"eu-central\"\n\t\tcase \"ash\":\n\t\t\tzoneRegion = \"us-east\"\n\t\tcase \"hil\":\n\t\t\tzoneRegion = \"us-west\"\n\t\tdefault:\n\t\t\treturn \"\", fmt.Errorf(\"unknown zone %q for hetzner cloud, known zones are fsn1, nbg1, hel1, ash, hil\", subnet.Zone)\n\t\t}\n\n\t\tif region != \"\" && zoneRegion != region {\n\t\t\treturn \"\", fmt.Errorf(\"cluster cannot span multiple regions (found zone %q, but region is %q)\", subnet.Zone, region)\n\t\t}\n\n\t\tregion = zoneRegion\n\t}\n\n\treturn region, nil\n}\n","sourceCodeStart":21,"sourceCodeEnd":51,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/hetzner/utils.go#L21-L51","documentation":"FindRegion maps each cluster subnet's Hetzner zone to its region. Hetzner only supports fsn1, nbg1, hel1, ash, hil zones; any other zone string is rejected with this error. It catches typos or invalid zone values in the cluster spec before cloud provisioning.","triggerScenarios":"A cluster subnet spec has a zone not in {fsn1, nbg1, hel1, ash, hil} — typo like \"fsn2\", \"eu-central\" (a region, not a zone), or empty zone.","commonSituations":"Hand-edited cluster spec topology.subnets with an invalid zone; copying zone names from another provider; using region names where zone names are expected.","solutions":["Fix the subnet zone in `kops edit cluster` to one of fsn1, nbg1, hel1, ash, hil.","Run `kops get clusters -o yaml` and inspect topology.subnets[].zone for typos.","Re-run `kops update cluster` after correcting."],"exampleFix":"// before\nsubnets:\n- name: eu\n  zone: fsn2\n// after\nsubnets:\n- name: eu\n  zone: fsn1","handlingStrategy":"validation","validationCode":"var validHetznerZones = map[string]bool{\"fsn1\":true,\"nbg1\":true,\"hel1\":true,\"ash\":true,\"hil\":true}\nfor _, s := range subnets {\n  if !validHetznerZones[s.Zone] { return fmt.Errorf(\"invalid Hetzner zone %q\", s.Zone) }\n}","typeGuard":"func isValidHetznerZone(z string) bool {\n  switch z { case \"fsn1\",\"nbg1\",\"hel1\",\"ash\",\"hil\": return true }\n  return false\n}","tryCatchPattern":null,"preventionTips":["Use `kops create cluster --zones fsn1,nbg1` rather than hand-editing YAML.","Remember Hetzner zone names are short codes (fsn1), not region names (eu-central).","Validate the cluster spec with `kops validate cluster` before update."],"tags":["hetzner","zone","configuration"],"backgroundTag":"invalid-cloud-zone","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}