kubernetes/kops · error
Subnet ID is required for subnet name=%v
Error message
Subnet ID is required for subnet name=%v
What it means
CheckChanges requires every expected NLB SubnetMapping to carry a concrete subnet ID (shared/managed subnets must already be resolved); a mapping still had only a Name, so the diff cannot be validated.
Source
Thrown at upup/pkg/fi/cloudup/awstasks/network_load_balancer.go:441
}
if e.AccessLog != nil {
if e.AccessLog.Enabled == nil {
return fi.RequiredField("Accesslog.Enabled")
}
if *e.AccessLog.Enabled {
if e.AccessLog.S3BucketName == nil {
return fi.RequiredField("Accesslog.S3Bucket")
}
}
}
} else {
if len(changes.SubnetMappings) > 0 {
expectedSubnets := make(map[string]*string)
for _, s := range e.SubnetMappings {
subnetID := fi.ValueOf(s.Subnet.ID)
if subnetID == "" {
return fmt.Errorf("Subnet ID is required for subnet name=%v", fi.ValueOf(s.Subnet.Name))
}
if s.AllocationID != nil {
expectedSubnets[subnetID] = s.AllocationID
} else if s.PrivateIPv4Address != nil {
expectedSubnets[subnetID] = s.PrivateIPv4Address
} else {
expectedSubnets[subnetID] = nil
}
}
for _, s := range a.SubnetMappings {
subnetID := fi.ValueOf(s.Subnet.ID)
if subnetID == "" {
return fmt.Errorf("Subnet ID is required for subnet name=%v", fi.ValueOf(s.Subnet.Name))
}
eIP, ok := expectedSubnets[subnetID]
if !ok {View on GitHub (pinned to 4c8573c808)
Solutions
- Ensure the referenced subnets exist (or are tagged for discovery) before running the apply; run `kops update` first
- Give shared subnets explicit ids in the spec so they resolve deterministically
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at upup/pkg/fi/cloudup/awstasks/network_load_balancer.go:441 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/69f9455872e5ba51.
Report an issue: GitHub.