kubernetes/kops · error

digitalocean cloud provider currently supports one region on

Error message

digitalocean cloud provider currently supports one region only.

What it means

setupZones (DigitalOcean branch) validation: fires when more than one zone is given. DigitalOcean zones are regions and the provider supports only a single region per cluster, so multi-zone input is rejected before subnet mapping.

Source

Thrown at upup/pkg/fi/cloudup/new_cluster.go:767

					Region: region,
				}
				if len(opt.SubnetIDs) != 0 {
					// We don't support multi-region clusters, so we can't have more than one subnet
					if len(opt.SubnetIDs) != 1 {
						return nil, fmt.Errorf("expected exactly one subnet for GCE, got %d", len(opt.SubnetIDs))
					}
					subnet.ID = opt.SubnetIDs[0]
				}
				cluster.Spec.Networking.Subnets = append(cluster.Spec.Networking.Subnets, *subnet)
			}
			zoneToSubnetsMap[zoneName] = append(zoneToSubnetsMap[zoneName], subnet)
		}

		return zoneToSubnetsMap, nil

	case api.CloudProviderDO:
		if len(opt.Zones) > 1 {
			return nil, fmt.Errorf("digitalocean cloud provider currently supports one region only.")
		}

		// For DO we just pass in the region for --zones
		region := opt.Zones[0]
		subnet := model.FindSubnet(cluster, region)

		// for DO, subnets are just regions
		subnetName := region

		if subnet == nil {
			subnet = &api.ClusterSubnetSpec{
				Name: subnetName,
				// region and zone are the same for DO
				Region: region,
				Zone:   region,
			}
			cluster.Spec.Networking.Subnets = append(cluster.Spec.Networking.Subnets, *subnet)
		}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Pass a single --zones value (one DO region) for DigitalOcean clusters
  2. Split multi-region deployments into separate clusters
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/new_cluster.go:767 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/fc3f54c198b22e3f. Report an issue: GitHub.