{"record":{"id":"2f01f23b2da166f1","repo":"kubernetes/kops","slug":"unknown-load-balancer-type-q-2f01f2","errorCode":null,"errorMessage":"unknown load balancer Type: %q","messagePattern":"unknown load balancer Type: %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/model/azuremodel/api_loadbalancer.go","lineNumber":104,"sourceCode":"\t\t}\n\t\tlb.Subnet = b.LinkToAzureSubnet(subnet)\n\tcase kops.LoadBalancerTypePublic:\n\t\tlb.External = to.Ptr(true)\n\n\t\t// Create Public IP Address for Public Loadbalacer\n\t\tp := &azuretasks.PublicIPAddress{\n\t\t\tName:             new(b.NameForLoadBalancer()),\n\t\t\tLifecycle:        b.Lifecycle,\n\t\t\tResourceGroup:    b.LinkToResourceGroup(),\n\t\t\tIPVersion:        network.IPVersionIPv4,\n\t\t\tAllocationMethod: network.IPAllocationMethodStatic,\n\t\t\tSKU:              network.PublicIPAddressSKUNameStandard,\n\t\t\tTags:             map[string]*string{},\n\t\t}\n\t\tc.AddTask(p)\n\t\tlb.PublicIPAddress = p\n\tdefault:\n\t\treturn fmt.Errorf(\"unknown load balancer Type: %q\", lbSpec.Type)\n\t}\n\n\tif b.Cluster.UsesLoadBalancerForKopsController() {\n\t\tlb.WellKnownServices = append(lb.WellKnownServices, wellknownservices.KopsController)\n\n\t\t// kops-controller probe: HTTPS on 3988 with /healthz\n\t\tlb.Probes = append(lb.Probes, azuretasks.LoadBalancerProbe{\n\t\t\tName:              fmt.Sprintf(\"Health-HTTPS-%d\", wellknownports.KopsControllerPort),\n\t\t\tProtocol:          network.ProbeProtocolHTTPS,\n\t\t\tPort:              wellknownports.KopsControllerPort,\n\t\t\tRequestPath:       new(\"/healthz\"),\n\t\t\tIntervalInSeconds: 15,\n\t\t\tNumberOfProbes:    4,\n\t\t})\n\t\tlb.Rules = append(lb.Rules, azuretasks.LoadBalancerRule{\n\t\t\tName:                 fmt.Sprintf(\"TCP-%d\", wellknownports.KopsControllerPort),\n\t\t\tPort:                 wellknownports.KopsControllerPort,\n\t\t\tProbeName:            fmt.Sprintf(\"Health-HTTPS-%d\", wellknownports.KopsControllerPort),","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/model/azuremodel/api_loadbalancer.go#L86-L122","documentation":"The load balancer type in the cluster spec is neither Internal nor Public when building the Azure API load balancer task; an unrecognized spec.api.loadBalancer.type value reached the switch default.","triggerScenarios":"Thrown at pkg/model/azuremodel/api_loadbalancer.go:104 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the load balancer type to Internal or Public","Remove the loadBalancer block to use defaults","Validate the cluster 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-12T12:17:11.808Z"}