kubernetes/kops · error
error listing Akamai (Linode) instances: %w
Error message
error listing Akamai (Linode) instances: %w
What it means
listInstances in kOps' Akamai (Linode) resource discovery wraps any failure from linodego's ListInstances API call. It means the Linode API rejected or failed the instance list request, so kOps cannot enumerate cluster compute resources.
Source
Thrown at pkg/resources/linode/resources.go:86
for _, tracker := range trackers {
resourceTrackers[tracker.Type+":"+tracker.ID] = tracker
}
}
return resourceTrackers, nil
}
// listInstances lists Akamai (Linode) instances owned by the cluster.
func listInstances(cloud fi.Cloud, clusterInfo resources.ClusterInfo) ([]*resources.Resource, error) {
c := cloud.(cloudlinode.LinodeCloud)
listOptions, err := cloudlinode.ListOptionsForTags(fmt.Sprintf("%s:%s", cloudlinode.TagKubernetesClusterName, clusterInfo.Name))
if err != nil {
return nil, err
}
instances, err := c.Client().ListInstances(context.Background(), listOptions)
if err != nil {
return nil, fmt.Errorf("error listing Akamai (Linode) instances: %w", err)
}
var resourceTrackers []*resources.Resource
for _, instance := range instances {
blocks, err := instanceSubnetBlocks(c, instance)
if err != nil {
return nil, err
}
resourceTrackers = append(resourceTrackers, &resources.Resource{
Name: instance.Label,
ID: strconv.Itoa(instance.ID),
Type: resourceTypeInstance,
Deleter: deleteInstance,
Blocks: blocks,
Obj: instance,
})
}View on GitHub (pinned to 4c8573c808)
Solutions
- Verify LINODE_TOKEN (or the configured API token) is set, valid, and has sufficient scopes.
- Retry after a Linode rate-limit window if the wrapped error is 429.
- Check Linode status page / network connectivity for API outages.
- Confirm the token belongs to the same Linode account that owns the cluster instances.
Defensive patterns
Strategy: retry
Validate before calling
// preflight: token must be present before calling the API
if os.Getenv("LINODE_TOKEN") == "" {
return errors.New("LINODE_TOKEN is not set")
} Type guard
func isLinodeAuthError(err error) bool {
var le linodego.Error
if errors.As(err, &le) {
return le.Code == 401 || le.Code == 403
}
return false
} Try / catch
instances, err := c.Client().ListInstances(ctx, listOptions)
if err != nil {
var le linodego.Error
if errors.As(err, &le) && le.Code == 429 {
return retryWithBackoff(err)
}
return fmt.Errorf("error listing Akamai (Linode) instances: %w", err)
} Prevention
- Check LINODE_TOKEN validity with `linode-cli profile view` before running kOps operations.
- Handle 429 responses with exponential backoff.
- Confirm the token's account matches the cluster's Linode account.
- Watch the Linode status page during large teardowns.
When it happens
Trigger: c.Client().ListInstances(ctx, listOptions) errors: invalid/expired Linode API token, missing account scopes, 429 rate limit, network failure, or a bad ListOptions filter.
Common situations: LINODE_TOKEN unset or rotated; token from another account without access to the cluster's region; transient Linode API outage during `kops delete cluster` or get-all.
Related errors
- error listing Akamai (Linode) volumes: %w
- error listing Akamai (Linode) interfaces for instance %s(%d)
- error listing Akamai (Linode) VPCs: %w
- error creating Akamai (Linode) SSH key %q: %w
- error parsing Akamai (Linode) %s ID %q: %w
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/3dc67a3cb67e685e.
Report an issue: GitHub.