{"record":{"id":"0643600c78571382","repo":"kubernetes/kops","slug":"unknown-load-balancer-type-q-064360","errorCode":null,"errorMessage":"unknown load balancer type: %q","messagePattern":"unknown load balancer type: %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/azure/azure_cloud.go","lineNumber":315,"sourceCode":"\t\t\t\t\t})\n\t\t\t\tcase kops.LoadBalancerTypePublic:\n\t\t\t\t\tif i.Properties.PublicIPAddress == nil || i.Properties.PublicIPAddress.ID == nil {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tpips, err := c.publicIPAddressesClient.List(context.TODO(), rg)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn nil, fmt.Errorf(\"error getting PublicIPAddress for API Ingress Status: %w\", err)\n\t\t\t\t\t}\n\t\t\t\t\tfor _, pip := range pips {\n\t\t\t\t\t\tif pip.ID == nil || pip.Properties == nil || pip.Properties.IPAddress == nil || *pip.ID != *i.Properties.PublicIPAddress.ID {\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tingresses = append(ingresses, fi.ApiIngressStatus{\n\t\t\t\t\t\t\tIP: *pip.Properties.IPAddress,\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\treturn nil, fmt.Errorf(\"unknown load balancer type: %q\", lbSpec.Type)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// Get scale sets in cluster resource group and find masters scale set\n\t\tscaleSets, err := c.vmscaleSetsClient.List(context.TODO(), rg)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"getting cluster control plane VMSS for API ingress status: %w\", err)\n\t\t}\n\t\tvar vmssName string\n\t\tfor _, scaleSet := range scaleSets {\n\t\t\tval, ok := scaleSet.Tags[TagClusterName]\n\t\t\tval2, ok2 := scaleSet.Tags[TagNameRolePrefix+TagRoleControlPlane]\n\t\t\tval3, ok3 := scaleSet.Tags[TagNameRolePrefix+TagRoleMaster]\n\t\t\tif ok && *val == cluster.Name && (ok2 && *val2 == \"1\" || ok3 && *val3 == \"1\") {\n\t\t\t\tvmssName = *scaleSet.Name\n\t\t\t\tbreak\n\t\t\t}","sourceCodeStart":297,"sourceCodeEnd":333,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/azure/azure_cloud.go#L297-L333","documentation":"Guard/switch default in GetApiIngressStatus: the cluster spec declares an API load balancer type (%q) that this code path does not recognize, so the frontend IP cannot be classified as internal or public. A cluster spec/field value problem.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/azure/azure_cloud.go:315 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set spec.api.loadBalancer.type to a supported value (Internal or Public)","Edit the cluster with 'kops edit cluster' and correct the load balancer type"],"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"}