{"record":{"id":"157fce8e2a92c12e","repo":"kubernetes/kops","slug":"no-suitable-subnets-found","errorCode":null,"errorMessage":"no suitable subnets found","messagePattern":"no suitable subnets found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/model/azuremodel/api_loadbalancer.go","lineNumber":151,"sourceCode":"\n// subnetForLoadBalancer returns the subnet the loadbalancer will use.\nfunc (c *AzureModelContext) subnetForLoadBalancer() (*kops.ClusterSubnetSpec, error) {\n\t// Get all master instance group subnets\n\tfor _, ig := range c.MasterInstanceGroups() {\n\t\tsubnets, err := c.GatherSubnets(ig)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif len(subnets) != 1 {\n\t\t\treturn nil, fmt.Errorf(\"expected exactly one subnet for InstanceGroup %q; subnets was %s\", ig.Name, ig.Spec.Subnets)\n\t\t}\n\t\tif subnets[0].Type != kops.SubnetTypeDualStack && subnets[0].Type != kops.SubnetTypePrivate {\n\t\t\tcontinue\n\t\t}\n\t\treturn subnets[0], nil\n\t}\n\n\treturn nil, fmt.Errorf(\"no suitable subnets found\")\n}\n","sourceCodeStart":133,"sourceCodeEnd":153,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/model/azuremodel/api_loadbalancer.go#L133-L153","documentation":"No control-plane instance group yielded a private or dual-stack subnet, so there is no suitable subnet to attach the internal API load balancer to; all master subnets were skipped or absent.","triggerScenarios":"Thrown at pkg/model/azuremodel/api_loadbalancer.go:151 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure at least one control-plane instance group uses a Private or DualStack subnet","Review subnet types in the cluster spec","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"}