kubernetes/kops · error

unexpected number of frontend configs found for LoadBalancer

Error message

unexpected number of frontend configs found for LoadBalancer %s: %d

What it means

Consistency guard while reconciling an existing Azure LoadBalancer: kOps expects exactly one frontend IP configuration on its own load balancer, and this fires when the discovered LB has zero or more than one. Typically happens when the LB was modified outside kOps or a stale/duplicated frontend config exists.

Source

Thrown at upup/pkg/fi/cloudup/azuretasks/loadbalancer.go:178

	for _, v := range l {
		if *v.Name == *lb.Name {
			found = v
			break
		}
	}
	if found == nil {
		return nil, nil
	}
	if found.Properties != nil && found.Properties.ProvisioningState != nil && *found.Properties.ProvisioningState == network.ProvisioningStateFailed {
		klog.Warningf("found load balancer %q in failed provisioning state", *lb.Name)
		return nil, nil
	}

	lbProperties := found.Properties

	feConfigs := lbProperties.FrontendIPConfigurations
	if len(feConfigs) != 1 {
		return nil, fmt.Errorf("unexpected number of frontend configs found for LoadBalancer %s: %d", *lb.Name, len(feConfigs))
	}
	feConfig := feConfigs[0]
	subnet := feConfig.Properties.Subnet

	actual := &LoadBalancer{
		Name:              lb.Name,
		Lifecycle:         lb.Lifecycle,
		WellKnownServices: lb.WellKnownServices,
		ResourceGroup: &ResourceGroup{
			Name: lb.ResourceGroup.Name,
		},
		External: to.Ptr(feConfig.Properties.PublicIPAddress != nil),
		Tags:     found.Tags,
	}
	if found.SKU != nil {
		actual.SKU = fi.ValueOf(found.SKU.Name)
	}
	if subnet != nil {

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Inspect the load balancer's frontend IP configurations in the Azure portal
  2. Remove manually added frontend configurations or delete the LB so kOps recreates it
  3. Ensure no other tool shares the same load balancer name
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/azuretasks/loadbalancer.go:178 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/5fc11f6b86182f7c. Report an issue: GitHub.