{"record":{"id":"cb4aed4a60fbd28a","repo":"kubernetes/kops","slug":"instancegroup-q-has-multiple-subnets","errorCode":null,"errorMessage":"instanceGroup %q has multiple subnets","messagePattern":"instanceGroup %q has multiple subnets","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/model/gcemodel/autoscalinggroup.go","lineNumber":348,"sourceCode":"\tclusterHasApiServerOnly := false\n\tfor _, ig := range b.InstanceGroups {\n\t\tif ig.IsAPIServerOnly() {\n\t\t\tclusterHasApiServerOnly = true\n\t\t\tbreak\n\t\t}\n\t}\n\n\tfor _, ig := range b.InstanceGroups {\n\t\tsubnets, err := b.GatherSubnets(ig)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// On GCE, instance groups cannot have multiple subnets.\n\t\t// Because subnets are regional on GCE, this should not be limiting.\n\t\t// (IGs can in theory support multiple zones, but in practice we don't recommend this)\n\t\tif len(subnets) != 1 {\n\t\t\treturn fmt.Errorf(\"instanceGroup %q has multiple subnets\", ig.Name)\n\t\t}\n\t\tsubnet := subnets[0]\n\n\t\tinstanceTemplate, err := b.buildInstanceTemplate(c, ig, subnet)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tc.AddTask(instanceTemplate)\n\n\t\tinstanceCountByZone, err := b.splitToZones(ig)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tfor zone, targetSize := range instanceCountByZone {\n\t\t\tname := gce.NameForInstanceGroupManager(b.Cluster.ObjectMeta.Name, ig.ObjectMeta.Name, zone)\n\n\t\t\tt := &gcetasks.InstanceGroupManager{","sourceCodeStart":330,"sourceCodeEnd":366,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/model/gcemodel/autoscalinggroup.go#L330-L366","documentation":"A GCE instance group resolved to zero or multiple subnets, but GCE requires exactly one per instance group (subnets are regional on GCE); the IG's spec.subnets list is inconsistent.","triggerScenarios":"Thrown at pkg/model/gcemodel/autoscalinggroup.go:348 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Assign exactly one subnet per GCE instance group","Check subnet names in instance group specs against the cluster's subnet definitions","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"}