kubernetes/kops · error

linode subnets must all use the same region; found

Error message

linode subnets must all use the same region; found %q and %q

What it means

Fires while building the Linode network model: the first subnet encountered sets the region, and a later subnet in the cluster spec declared a different Region. Linode clusters are effectively single-region, so all subnets must use the same region.

Solutions

  1. Edit the cluster spec so every subnet and instance group uses the same Linode region
  2. Remove stray subnets left over from a region change before re-running `kops update`
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at pkg/model/linodemodel/network.go:69 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/a5d1d039fd6ec4d1. Report an issue: GitHub.

Appendix: source

Thrown at pkg/model/linodemodel/network.go:69

		if subnet.Region == "" {
			return fmt.Errorf("linode subnet %q requires a region", subnetName)
		}
		if subnet.CIDR == "" {
			return fmt.Errorf("linode subnet %q requires a CIDR", subnetName)
		}

		normalizedSubnetName := linode.NormalizeLinodeLabel(b.ClusterName() + "-" + subnet.Name)
		if previousSubnetName, found := seenSubnetNames[normalizedSubnetName]; found {
			return fmt.Errorf("linode subnets %q and %q normalize to the same label %q", previousSubnetName, subnetName, normalizedSubnetName)
		}
		seenSubnetNames[normalizedSubnetName] = subnetName

		if region == "" {
			region = subnet.Region
			continue
		}
		if subnet.Region != region {
			return fmt.Errorf("linode subnets must all use the same region; found %q and %q", region, subnet.Region)
		}
	}

	name := linode.NormalizeLinodeLabel(b.ClusterName())
	description := fmt.Sprintf("kOps VPC for %s", b.ClusterName())
	vpcTask := &linodetasks.VPC{
		Name:        new(name),
		Lifecycle:   b.Lifecycle,
		Description: new(description),
		Region:      new(region),
	}
	c.AddTask(vpcTask)

	for _, subnet := range b.Cluster.Spec.Networking.Subnets {
		subnetName := linode.NormalizeLinodeLabel(b.ClusterName() + "-" + subnet.Name)
		subnetTask := &linodetasks.Subnet{
			Name:      new(subnetName),
			Lifecycle: b.Lifecycle,

View on GitHub (pinned to 4c8573c808)