kubernetes/kops · error
error listing Akamai (Linode) SSH keys: %w
Error message
error listing Akamai (Linode) SSH keys: %w
What it means
When an authorized key is referenced by name instead of inline content, resolveAuthorizedKeys lazily lists the account's SSH keys via ListSSHKeys to build a label->key map. This wraps any API failure from that listing call.
Source
Thrown at upup/pkg/fi/cloudup/linodetasks/instance.go:283
var keysByName map[string]string
for _, key := range keys {
if key == nil {
continue
}
if key.PublicKey != nil {
publicKey, err := fi.ResourceAsString(*key.PublicKey)
if err != nil {
return nil, fmt.Errorf("error rendering SSH key data: %w", err)
}
authorizedKeys = append(authorizedKeys, strings.TrimSpace(publicKey))
continue
}
if keysByName == nil {
listedKeys, err := client.ListSSHKeys(context.TODO(), nil)
if err != nil {
return nil, fmt.Errorf("error listing Akamai (Linode) SSH keys: %w", err)
}
keysByName = make(map[string]string, len(listedKeys))
for _, listedKey := range listedKeys {
keysByName[listedKey.Label] = listedKey.SSHKey
}
}
publicKey, found := keysByName[fi.ValueOf(key.Name)]
if !found {
return nil, fmt.Errorf("SSH key %q not found in Akamai (Linode)", fi.ValueOf(key.Name))
}
authorizedKeys = append(authorizedKeys, strings.TrimSpace(publicKey))
}
return authorizedKeys, nil
}
// buildLinodeInterfaces builds the Akamai (Linode) interfaces for the instance based on the subnet ID and whether a public interface is required.View on GitHub (pinned to 4c8573c808)
Solutions
- Verify the Linode API token is valid and has read access
- Check network connectivity to api.linode.com
- Retry the apply (transient API errors often resolve)
- Alternatively provide the key inline as PublicKey to avoid the lookup
Defensive patterns
Strategy: retry
Validate before calling
// verify token works before applying
if _, err := client.ListSSHKeys(ctx, nil); err != nil { return fmt.Errorf("linode API check failed: %w", err) } Try / catch
listedKeys, err := client.ListSSHKeys(ctx, nil)
if err != nil {
// retry with backoff; abort with wrapped error if persistent
return nil, fmt.Errorf("error listing Akamai (Linode) SSH keys: %w", err)
} Prevention
- Refresh LINODE_TOKEN before long CI runs
- Ensure the token has account read scopes
- Provide keys inline to skip the name lookup path entirely
When it happens
Trigger: client.ListSSHKeys fails — bad/expired API token, network error, or Linode API outage — while resolving a name-referenced SSH key during RenderLinode.
Common situations: Expired or scope-limited LINODE_TOKEN, connectivity/DNS problems from a CI runner, or a transient Linode API error.
Related errors
- error listing Akamai (Linode) SSH keys: %w
- error building Akamai (Linode) SSH key task: %w
- failed to list ssh keys: %w
- failed to delete ssh key %s(%s): %w
- failed to get info for Akamai (Linode) instance %q: %w
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/c3f34dc853b1b08c.
Report an issue: GitHub.