kubernetes/kops · error
linode subnet %q requires a name
Error message
linode subnet %q requires a name
What it means
Linode NetworkModelBuilder.Build() iterates the cluster's subnets and validates each has a Name; a subnet spec with an empty name fails validation. The error message reports the placeholder name ("subnet N", index-based) generated for display when the name is empty.
Source
Thrown at pkg/model/linodemodel/network.go:49
}
var _ fi.CloudupModelBuilder = &NetworkModelBuilder{}
func (b *NetworkModelBuilder) Build(c *fi.CloudupModelBuilderContext) error {
if len(b.Cluster.Spec.Networking.Subnets) == 0 {
return fmt.Errorf("linode VPC requires at least one subnet")
}
seenSubnetNames := map[string]string{}
region := ""
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
}View on GitHub (pinned to 4c8573c808)
Solutions
- Add a unique name to each subnet in cluster.spec.networking.subnets.
- Use a name that remains valid after Linode label normalization (avoid special characters and excessive length).
- Re-run kops update cluster after the fix.
Example fix
// before - region: us-east cidr: 10.0.0.0/24 // after - name: us-east-1a region: us-east cidr: 10.0.0.0/24
Defensive patterns
Strategy: validation
Validate before calling
for i, s := range cluster.Spec.Networking.Subnets {
if s.Name == "" {
return fmt.Errorf("subnet %d missing name", i)
}
} Prevention
- Give every subnet an explicit, lowercase hyphenated name.
- Lint manifests against the kops API schema before apply.
- Avoid provider-specific defaults when porting specs to Linode.
- Use kops toolbox template to render and inspect final subnets.
When it happens
Trigger: A cluster.spec.networking.subnets entry with name omitted or set to "" while region and CIDR are present — caught during kops create/update cluster for a Linode cluster.
Common situations: YAML manifest entries with the name key missing (e.g. only region/cidr filled); templating that drops empty fields; copy-paste of an AWS-style subnet entry relying on default naming that Linode does not support.
Related errors
- expected exactly one subnet for InstanceGroup %q; subnets wa
- linode VPC requires at least one subnet
- linode subnet %q requires a region
- linode subnet %q requires a CIDR
- Subnet.VPC is required
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/67be12ebbbfabb1f.
Report an issue: GitHub.