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

  1. Verify LINODE_TOKEN (or the configured API token) is set, valid, and has sufficient scopes.
  2. Retry after a Linode rate-limit window if the wrapped error is 429.
  3. Check Linode status page / network connectivity for API outages.
  4. 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

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


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/3dc67a3cb67e685e. Report an issue: GitHub.