kubernetes/kops · error
could not determine region from zone %s: %w
Error message
could not determine region from zone %s: %w
What it means
ParseRegionFromZone failed: after stripping the numeric suffix from the zone (e.g. 'fr-par-1' -> 'fr-par'), scw.ParseRegion rejected the result. Means the cluster spec carries a malformed or unknown zone string that doesn't map to a Scaleway region.
Source
Thrown at upup/pkg/fi/cloudup/scaleway/utils.go:63
return isHTTPCodeError(err, http.StatusNotFound) || errors.As(err, ¬FoundError)
}
func ParseZoneFromClusterSpec(clusterSpec kops.ClusterSpec) (scw.Zone, error) {
zone := ""
for _, subnet := range clusterSpec.Networking.Subnets {
if zone == "" {
zone = subnet.Zone
} else if zone != subnet.Zone {
return "", fmt.Errorf("scaleway currently only supports clusters in the same zone")
}
}
return scw.Zone(zone), nil
}
func ParseRegionFromZone(zone scw.Zone) (region scw.Region, err error) {
region, err = scw.ParseRegion(strings.TrimRight(string(zone), "-123"))
if err != nil {
return "", fmt.Errorf("could not determine region from zone %s: %w", zone, err)
}
return region, nil
}
func ClusterNameFromTags(tags []string) string {
for _, tag := range tags {
if strings.HasPrefix(tag, TagClusterName) {
return strings.TrimPrefix(tag, TagClusterName+"=")
}
}
return ""
}
func InstanceGroupNameFromTags(tags []string) string {
for _, tag := range tags {
if strings.HasPrefix(tag, TagInstanceGroup) {
return strings.TrimPrefix(tag, TagInstanceGroup+"=")
}View on GitHub (pinned to 4c8573c808)
Solutions
- Correct the zone in the cluster spec to a valid Scaleway zone like fr-par-1 or nl-ams-2
- Check the wrapped error for the exact parse failure
- Update kOps/SDK if the zone is new and unsupported by the vendored SDK
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at upup/pkg/fi/cloudup/scaleway/utils.go:63 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/b039964b7c099bc9.
Report an issue: GitHub.