kubernetes/kops · error
linode subnets and normalize to the same label
Error message
linode subnets %q and %q normalize to the same label %q
What it means
Linode resource labels have strict character rules, so kOps normalizes each subnet label as NormalizeLinodeLabel(clusterName + "-" + subnetName). If two distinct subnets normalize to the same label, tasks would collide and the build aborts with this error identifying the two subnet names and the shared label.
Solutions
- Rename the subnets with clearly distinct, short, lowercase hyphenated names (e.g. us-east-1a, us-east-1b).
- Shorten the cluster name or subnet names so normalized labels stay within Linode's 64-char limit without truncation collisions.
- Precompute NormalizeLinodeLabel(clusterName + "-" + subnetName) for all subnets and confirm uniqueness before applying.
- Update the InstanceGroups to reference the renamed subnets and re-run kops update cluster.
Example fix
// before subnets: - name: us_east_1a - name: us-east-1a # normalizes to the same label // after subnets: - name: us-east-1a - name: us-east-1b
Defensive patterns
Strategy: validation
Validate before calling
seen := map[string]string{}
for _, s := range cluster.Spec.Networking.Subnets {
label := linode.NormalizeLinodeLabel(clusterName + "-" + s.Name)
if prev, ok := seen[label]; ok {
return fmt.Errorf("subnets %q and %q collide on label %q", prev, s.Name, label)
}
seen[label] = s.Name
} Prevention
- Choose short, distinct, lowercase-hyphenated subnet names.
- Keep cluster name short enough that normalized labels fit Linode's 64-char limit.
- Pre-normalize and check uniqueness of all resource labels before apply.
- Avoid underscore/dot variants of the same name in one cluster spec.
When it happens
Trigger: Two cluster.spec.networking.subnets entries whose names differ only in characters stripped/replaced by Linode label normalization (e.g. "us_east_1a" vs "us-east-1a"), or names so long that truncation to Linode's label limit makes them identical.
Common situations: Subnet names using underscores/dots/uppercase that normalize to the same hyphenated form; very long cluster+subnet names truncated identically; duplicated subnet entries with trivially different names.
Related errors
- error creating Akamai (Linode) Subnet
- error deleting Akamai (Linode) subnet
- error listing Akamai (Linode) VPC subnets for VPC
- error listing Akamai (Linode) VPC Subnets
- error updating Akamai (Linode) Subnet
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/e9a3840891a9e2e7.
Report an issue: GitHub.
Appendix: source
Thrown at pkg/model/linodemodel/network.go:60
for i, subnet := range b.Cluster.Spec.Networking.Subnets {
subnetName := subnet.Name
if subnetName == "" {
subnetName = fmt.Sprintf("subnet %d", i)
}
if subnet.Name == "" {
return fmt.Errorf("linode subnet %q requires a name", subnetName)
}
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),View on GitHub (pinned to 4c8573c808)