kubernetes/kops · error

building load-balancer task: %w

Error message

building load-balancer task: %w

What it means

Wrapped failure while parsing the Scaleway availability zone from the cluster spec (scaleway.ParseZoneFromClusterSpec) during load-balancer task construction. The root cause is an empty or malformed zone in the spec; this message is the wrapping layer.

Source

Thrown at pkg/model/scalewaymodel/api_loadbalancer.go:60

	// Configuration where a load balancer fronts the API
	if !b.UseLoadBalancerForAPI() {
		return nil
	}

	lbSpec := b.Cluster.Spec.API.LoadBalancer

	switch lbSpec.Type {
	case kops.LoadBalancerTypePublic:
		klog.V(8).Infof("Using public load-balancer")
	case kops.LoadBalancerTypeInternal:
		return fmt.Errorf("Scaleway clusters don't have a VPC yet, so internal load-balancers are not supported at the time")
	default:
		return fmt.Errorf("unhandled load-balancer type %q", lbSpec.Type)
	}

	zone, err := scaleway.ParseZoneFromClusterSpec(b.Cluster.Spec)
	if err != nil {
		return fmt.Errorf("building load-balancer task: %w", err)
	}

	lbTags := []string{
		fmt.Sprintf("%s=%s", scaleway.TagClusterName, b.ClusterName()),
		fmt.Sprintf("%s=%s", scaleway.TagNameRolePrefix, scaleway.TagRoleControlPlane),
	}
	for k, v := range b.CloudTags(b.ClusterName(), false) {
		lbTags = append(lbTags, fmt.Sprintf("%s=%s", k, v))
	}

	loadBalancerName := "api." + b.ClusterName()
	loadBalancer := &scalewaytasks.LoadBalancer{
		Name:                  new(loadBalancerName),
		Zone:                  new(string(zone)),
		Type:                  scalewaytasks.LbDefaultType,
		Lifecycle:             b.Lifecycle,
		Tags:                  lbTags,
		Description:           "Load-balancer for kops cluster " + b.ClusterName(),

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Set a valid Scaleway zone (e.g. fr-par-1) in the cluster spec
  2. Check the wrapped error for exactly which field failed to parse
  3. Re-run `kops update cluster` after correcting the zone
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at pkg/model/scalewaymodel/api_loadbalancer.go:60 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/9de728d728a83431. Report an issue: GitHub.