{"record":{"id":"72f58d69a7f03379","repo":"kubernetes/kops","slug":"could-not-find-utility-subnet-in-zone-q","errorCode":null,"errorMessage":"could not find utility subnet in zone: %q","messagePattern":"could not find utility subnet in zone: %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/model/awsmodel/context.go","lineNumber":74,"sourceCode":"\t}\n\n\treturn b.LinkToSubnet(matches[0]), nil\n}\n\nfunc (b *AWSModelContext) LinkToUtilitySubnetInZone(zoneName string) (*awstasks.Subnet, error) {\n\tvar matches []*kops.ClusterSubnetSpec\n\tfor i := range b.Cluster.Spec.Networking.Subnets {\n\t\ts := &b.Cluster.Spec.Networking.Subnets[i]\n\t\tif s.Zone != zoneName {\n\t\t\tcontinue\n\t\t}\n\t\tif s.Type != kops.SubnetTypeUtility {\n\t\t\tcontinue\n\t\t}\n\t\tmatches = append(matches, s)\n\t}\n\tif len(matches) == 0 {\n\t\treturn nil, fmt.Errorf(\"could not find utility subnet in zone: %q\", zoneName)\n\t}\n\tif len(matches) > 1 {\n\t\t// TODO: Support this\n\t\treturn nil, fmt.Errorf(\"found multiple utility subnets in zone: %q\", zoneName)\n\t}\n\n\treturn b.LinkToSubnet(matches[0]), nil\n}\nfunc (b *AWSModelContext) LinkToPrivateSubnetsInZone(zoneName string) ([]*awstasks.Subnet, error) {\n\tvar matches []*kops.ClusterSubnetSpec\n\tfor i := range b.Cluster.Spec.Networking.Subnets {\n\t\ts := &b.Cluster.Spec.Networking.Subnets[i]\n\t\tif s.Zone != zoneName {\n\t\t\tcontinue\n\t\t}\n\t\tif s.Type != kops.SubnetTypePrivate {\n\t\t\tcontinue\n\t\t}","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/model/awsmodel/context.go#L56-L92","documentation":"No subnet with type Utility exists in the requested availability zone in the cluster spec, so kOps cannot link utility/ELB resources into that zone; the input at fault is the spec's subnet list, not the zone itself.","triggerScenarios":"Thrown at pkg/model/awsmodel/context.go:74 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add a utility subnet for the quoted zone via kops edit cluster","Review the spec's subnet entries and their type/zone pairing","Re-run kops update after fixing the spec"],"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"}