kubernetes/kops · error
unknown load balancer Type: %q
Error message
unknown load balancer Type: %q
What it means
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.
Source
Thrown at pkg/model/azuremodel/api_loadbalancer.go:104
}
lb.Subnet = b.LinkToAzureSubnet(subnet)
case kops.LoadBalancerTypePublic:
lb.External = to.Ptr(true)
// Create Public IP Address for Public Loadbalacer
p := &azuretasks.PublicIPAddress{
Name: new(b.NameForLoadBalancer()),
Lifecycle: b.Lifecycle,
ResourceGroup: b.LinkToResourceGroup(),
IPVersion: network.IPVersionIPv4,
AllocationMethod: network.IPAllocationMethodStatic,
SKU: network.PublicIPAddressSKUNameStandard,
Tags: map[string]*string{},
}
c.AddTask(p)
lb.PublicIPAddress = p
default:
return fmt.Errorf("unknown load balancer Type: %q", lbSpec.Type)
}
if b.Cluster.UsesLoadBalancerForKopsController() {
lb.WellKnownServices = append(lb.WellKnownServices, wellknownservices.KopsController)
// kops-controller probe: HTTPS on 3988 with /healthz
lb.Probes = append(lb.Probes, azuretasks.LoadBalancerProbe{
Name: fmt.Sprintf("Health-HTTPS-%d", wellknownports.KopsControllerPort),
Protocol: network.ProbeProtocolHTTPS,
Port: wellknownports.KopsControllerPort,
RequestPath: new("/healthz"),
IntervalInSeconds: 15,
NumberOfProbes: 4,
})
lb.Rules = append(lb.Rules, azuretasks.LoadBalancerRule{
Name: fmt.Sprintf("TCP-%d", wellknownports.KopsControllerPort),
Port: wellknownports.KopsControllerPort,
ProbeName: fmt.Sprintf("Health-HTTPS-%d", wellknownports.KopsControllerPort),View on GitHub (pinned to 4c8573c808)
Solutions
- Set the load balancer type to Internal or Public
- Remove the loadBalancer block to use defaults
- Validate the cluster spec
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pkg/model/azuremodel/api_loadbalancer.go:104 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/2f01f23b2da166f1.
Report an issue: GitHub.