kubernetes/kops · error
listing front-ends for load-balancer %s: %w
Error message
listing front-ends for load-balancer %s: %w
What it means
kOps wraps failures from `lbService.ListFrontends` when the LoadBalancerFrontend task's Find looks up the existing front-end by name for the load-balancer. The error comes from the Scaleway LB Zoned API, not from the 'not found' case (that returns nil, nil when TotalCount != 1). Thrown in Find of lb_frontend.go.
Source
Thrown at upup/pkg/fi/cloudup/scalewaytasks/lb_frontend.go:82
func (l *LBFrontend) CompareWithID() *string {
return l.ID
}
func (l *LBFrontend) Find(context *fi.CloudupContext) (*LBFrontend, error) {
cloud := context.T.Cloud.(scaleway.ScwCloud)
lbService := cloud.LBService()
if l.LoadBalancer.LBID == nil {
return nil, nil
}
frontendResponse, err := lbService.ListFrontends(&lb.ZonedAPIListFrontendsRequest{
Zone: scw.Zone(cloud.Zone()),
LBID: fi.ValueOf(l.LoadBalancer.LBID),
Name: l.Name,
})
if err != nil {
return nil, fmt.Errorf("listing front-ends for load-balancer %s: %w", fi.ValueOf(l.LoadBalancer.LBID), err)
}
if frontendResponse.TotalCount != 1 {
return nil, nil
}
frontend := frontendResponse.Frontends[0]
return &LBFrontend{
Name: new(frontend.Name),
Lifecycle: l.Lifecycle,
ID: new(frontend.ID),
Zone: new(string(frontend.LB.Zone)),
InboundPort: new(frontend.InboundPort),
LoadBalancer: &LoadBalancer{
Name: new(frontend.LB.Name),
},
LBBackend: &LBBackend{
Name: new(frontend.Backend.Name),
ID: new(frontend.Backend.ID),View on GitHub (pinned to 4c8573c808)
Solutions
- Rerun `kops update cluster` — often transient
- Verify the LB exists at the configured zone and LBID in the Scaleway console
- Confirm cloud zone configuration matches the LB's zone
- Check Scaleway credentials/permissions for the LB API
- Inspect wrapped scw error (e.g. 404 not_found vs 403 permissions) for the precise cause
Example fix
// before: no diagnostics of cause
return nil, fmt.Errorf("listing front-ends for load-balancer %s: %w", lbID, err)
// after: classify the SDK error
var serr *scw.ResponseError
if errors.As(err, &serr) && serr.Status == 404 {
return nil, nil // LB gone; treat as not found
}
return nil, fmt.Errorf("listing front-ends for load-balancer %s: %w", lbID, err) Defensive patterns
Strategy: type-guard
Validate before calling
// confirm LB is reachable before listing its front-ends
lbs, err := lbService.ListLBs(&lb.ZonedAPIListLBsRequest{Zone: scw.Zone(cloud.Zone()), Name: lbName}, scw.WithAllPages())
if err != nil { return err }
if lbs.TotalCount != 1 { return nil } // LB gone; nothing to find Type guard
func lbNotFound(err error) bool {
var serr *scw.ResponseError
return errors.As(err, &serr) && serr.Status == 404
} Try / catch
if err != nil {
if lbNotFound(err) { return nil, nil } // treat as absent
return nil, fmt.Errorf("listing front-ends for load-balancer %s: %w", lbID, err)
} Prevention
- Ensure cloud zone matches the LB's zone before lookup
- Handle the TotalCount != 1 not-found path separately from hard errors
- Classify scw.ResponseError status codes in Find implementations
When it happens
Trigger: Find calls ListFrontends with Zone=scw.Zone(cloud.Zone()), LBID=l.LoadBalancer.LBID, Name=l.Name; the list call itself fails — invalid LBID, zone mismatch between cloud and LB, auth failure, or API outage.
Common situations: LB was deleted out-of-band so LBID is stale; cloud.Zone() returns a different zone than where the LB lives; expired Scaleway credentials; network partition during reconcile.
Related errors
- getting load-balancer %s: %w
- waiting for load-balancer: %w
- deleting load-balancer %s: %w
- updating back-end server IPs for load-balancer %s: %w
- creating back-end for load-balancer %s: %w
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/571caa01083cdf32.
Report an issue: GitHub.