kubernetes/kops · error
listing IPs for deletion: %w
Error message
listing IPs for deletion: %w
What it means
listServerIPs collects Scaleway flexible IPs tagged with the cluster tag so they can be deleted with the cluster. When the InstanceService ListIPs API call fails (pagination included via scw.WithAllPages), the error is wrapped with this message and returned, aborting resource listing for Scaleway clusters.
Source
Thrown at pkg/resources/scaleway/resources.go:148
Type: resourceTypeServer,
Deleter: deleteServer,
Obj: server,
}
resourceTrackers = append(resourceTrackers, resourceTracker)
}
return resourceTrackers, nil
}
func listServerIPs(cloud fi.Cloud, clusterName string) ([]*resources.Resource, error) {
c := cloud.(scaleway.ScwCloud)
ips, err := c.InstanceService().ListIPs(&instance.ListIPsRequest{
Zone: scw.Zone(c.Zone()),
Tags: []string{fmt.Sprintf("%s=%s", scaleway.TagClusterName, clusterName)},
}, scw.WithAllPages())
if err != nil {
return nil, fmt.Errorf("listing IPs for deletion: %w", err)
}
resourceTrackers := []*resources.Resource(nil)
for _, ip := range ips.IPs {
resourceTracker := &resources.Resource{
Name: ip.Address.String(),
ID: ip.ID,
Type: resourceTypeServerIP,
Deleter: deleteServerIP,
Obj: ip,
}
resourceTrackers = append(resourceTrackers, resourceTracker)
}
return resourceTrackers, nil
}
func listSSHKeys(cloud fi.Cloud, clusterName string) ([]*resources.Resource, error) {View on GitHub (pinned to 4c8573c808)
Solutions
- Verify SCW_ACCESS_KEY / SCW_SECRET_KEY (or scw config) are valid and have adequate IAM scopes
- Check the zone configured for the cluster matches where the IPs live (scw.Zone(c.Zone()))
- Retry after confirming Scaleway API status — transient 5xx/429 errors resolve with backoff
- Run `scw instance ip list` with the same credentials to reproduce the API error directly
Example fix
// before export SCW_ACCESS_KEY=old-key // after scw login export SCW_ACCESS_KEY=$(scw config get access-key) export SCW_SECRET_KEY=$(scw config get secret-key) kops delete cluster --name mycluster
Defensive patterns
Strategy: validation
Validate before calling
// Pre-check Scaleway credentials and reachability before listing
if os.Getenv("SCW_ACCESS_KEY") == "" || os.Getenv("SCW_SECRET_KEY") == "" {
return fmt.Errorf("scaleway credentials missing")
}
if _, err := c.InstanceService().ListIPs(&instance.ListIPsRequest{Zone: scw.Zone(c.Zone())}, scw.WithAllPages()); err != nil {
return fmt.Errorf("pre-flight IP list failed: %w", err)
} Try / catch
trackers, err := scaleway.ListResources(cloud, clusterInfo)
var apiErr *scw.Error
if err != nil && errors.As(err, &apiErr) {
klog.Errorf("scaleway API error %d: %s — check credentials/zone", apiErr.StatusCode, apiErr.Message)
return retryAfterBackoff(err)
} Prevention
- Validate SCW_ACCESS_KEY/SCW_SECRET_KEY before cluster operations
- Confirm cluster zone matches the API scope
- Check Scaleway status page during outages
- Pre-flight `scw instance ip list` with the same credentials
When it happens
Trigger: Calling ListResources on a Scaleway cluster where the Instance API ListIPs request (pkg/resources/scaleway/resources.go:148) fails: invalid/expired SCW_ACCESS_KEY or SCW_SECRET_KEY, wrong zone, network outage, or Scaleway API 4xx/5xx.
Common situations: Missing or stale Scaleway credentials in the environment; zone mismatch between the cluster config and API scope; Scaleway transient outage or rate limiting; deleted project still referenced by cluster config.
Related errors
- listing IPs for server %s: %w
- describing instance for arn %q
- failed to delete instance IP %s: %w
- spotinst: error listing resources: %v
- got an error while querying for valid regions (verify your A
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/5c21ab06c56220a4.
Report an issue: GitHub.