{"record":{"id":"06d3f56527d09d06","repo":"kubernetes/kops","slug":"subnet-q-has-unknown-type-q","errorCode":null,"errorMessage":"subnet %q has unknown type %q","messagePattern":"subnet %q has unknown type %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/model/awsmodel/network.go","lineNumber":376,"sourceCode":"\t\t\t\t// Private Subnet Route Table Associations\n\t\t\t\t//\n\t\t\t\t// Map the Private subnet to the Private route table\n\t\t\t\tc.AddTask(&awstasks.RouteTableAssociation{\n\t\t\t\t\tName:       new(\"private-\" + subnetSpec.Name + \".\" + b.ClusterName()),\n\t\t\t\t\tLifecycle:  b.Lifecycle,\n\t\t\t\t\tRouteTable: b.LinkToPrivateRouteTableInZone(subnetSpec.Zone),\n\t\t\t\t\tSubnet:     subnet,\n\t\t\t\t})\n\n\t\t\t\t// TODO: validate even if shared?\n\t\t\t\tif infoByZone[subnetSpec.Zone] == nil {\n\t\t\t\t\tinfoByZone[subnetSpec.Zone] = &zoneInfo{}\n\t\t\t\t}\n\t\t\t\tinfoByZone[subnetSpec.Zone].NATSubnets = append(infoByZone[subnetSpec.Zone].NATSubnets, subnetSpec)\n\t\t\t\tinfoByZone[subnetSpec.Zone].HavePrivateSubnet = true\n\t\t\t}\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"subnet %q has unknown type %q\", subnetSpec.Name, subnetSpec.Type)\n\t\t}\n\t}\n\n\t// Set up private route tables & egress\n\n\t// The instances in the private subnet can access the IPv6 Internet by\n\t// using an egress-only internet gateway.\n\tvar eigw *awstasks.EgressOnlyInternetGateway\n\tif !allPrivateSubnetsUnmanaged && b.IsIPv6Only() {\n\t\teigw = &awstasks.EgressOnlyInternetGateway{\n\t\t\tName:      new(b.ClusterName()),\n\t\t\tLifecycle: b.Lifecycle,\n\t\t\tVPC:       b.LinkToVPC(),\n\t\t\tShared:    new(sharedVPC),\n\t\t}\n\t\teigw.Tags = b.CloudTags(*eigw.Name, *eigw.Shared)\n\t\tc.AddTask(eigw)\n\t}","sourceCodeStart":358,"sourceCodeEnd":394,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/model/awsmodel/network.go#L358-L394","documentation":"A subnet in the cluster spec carries a type that matches no known subnet type during AWS network building; an invalid spec subnet type value that slipped past earlier validation.","triggerScenarios":"Thrown at pkg/model/awsmodel/network.go:376 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Correct the subnet type to a supported value (public/private/utility/dualstack)","Fix the subnets block via kops edit cluster","Re-run kops update"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}