kubernetes/kops · error
unknown load balancer type: %q
Error message
unknown load balancer type: %q
What it means
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.
Source
Thrown at upup/pkg/fi/cloudup/azure/azure_cloud.go:315
})
case kops.LoadBalancerTypePublic:
if i.Properties.PublicIPAddress == nil || i.Properties.PublicIPAddress.ID == nil {
continue
}
pips, err := c.publicIPAddressesClient.List(context.TODO(), rg)
if err != nil {
return nil, fmt.Errorf("error getting PublicIPAddress for API Ingress Status: %w", err)
}
for _, pip := range pips {
if pip.ID == nil || pip.Properties == nil || pip.Properties.IPAddress == nil || *pip.ID != *i.Properties.PublicIPAddress.ID {
continue
}
ingresses = append(ingresses, fi.ApiIngressStatus{
IP: *pip.Properties.IPAddress,
})
}
default:
return nil, fmt.Errorf("unknown load balancer type: %q", lbSpec.Type)
}
}
}
} else {
// Get scale sets in cluster resource group and find masters scale set
scaleSets, err := c.vmscaleSetsClient.List(context.TODO(), rg)
if err != nil {
return nil, fmt.Errorf("getting cluster control plane VMSS for API ingress status: %w", err)
}
var vmssName string
for _, scaleSet := range scaleSets {
val, ok := scaleSet.Tags[TagClusterName]
val2, ok2 := scaleSet.Tags[TagNameRolePrefix+TagRoleControlPlane]
val3, ok3 := scaleSet.Tags[TagNameRolePrefix+TagRoleMaster]
if ok && *val == cluster.Name && (ok2 && *val2 == "1" || ok3 && *val3 == "1") {
vmssName = *scaleSet.Name
break
}View on GitHub (pinned to 4c8573c808)
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
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at upup/pkg/fi/cloudup/azure/azure_cloud.go:315 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/0643600c78571382.
Report an issue: GitHub.