kubernetes/kops · error
error listing Akamai (Linode) SSH keys: %w
Error message
error listing Akamai (Linode) SSH keys: %w
What it means
SSHKey.Find wraps the linodego ListSSHKeys error while locating an existing Akamai (Linode) SSH key by label. It fires when the Linode API call fails (auth, rate limit, network), aborting reconciliation of the SSHKey task because current state cannot be determined.
Source
Thrown at upup/pkg/fi/cloudup/linodetasks/sshkey.go:54
}
var _ fi.CloudupTask = &SSHKey{}
var _ fi.CompareWithID = &SSHKey{}
func (s *SSHKey) CompareWithID() *string {
return s.Name
}
func (s *SSHKey) Find(c *fi.CloudupContext) (*SSHKey, error) {
cloud := c.T.Cloud.(linode.LinodeCloud)
name := fi.ValueOf(s.Name)
if name == "" {
return nil, fmt.Errorf("SSHKey.Name is required")
}
keys, err := cloud.Client().ListSSHKeys(c.Context(), nil)
if err != nil {
return nil, fmt.Errorf("error listing Akamai (Linode) SSH keys: %w", err)
}
var matched *linodego.SSHKey
for i := range keys {
key := &keys[i]
if key.Label != name {
continue
}
if matched != nil {
return nil, fmt.Errorf("found multiple SSH keys named %q", name)
}
matched = key
}
if matched == nil {
return nil, nil
}View on GitHub (pinned to 4c8573c808)
Solutions
- Verify the API token is valid and has read scopes
- Check connectivity to api.linode.com
- Retry the apply if the API error was transient
Defensive patterns
Strategy: retry
Validate before calling
// sanity-check API access before running apply
if _, err := client.ListSSHKeys(ctx, nil); err != nil { return err } Try / catch
keys, err := cloud.Client().ListSSHKeys(ctx, nil)
if err != nil {
// retry with backoff for transient errors, then wrap and fail
return nil, fmt.Errorf("error listing Akamai (Linode) SSH keys: %w", err)
} Prevention
- Keep LINODE_TOKEN fresh and correctly scoped
- Ensure egress to api.linode.com from the machine running kops
- Handle 429 rate limits with backoff in automation
When it happens
Trigger: cloud.Client().ListSSHKeys fails — invalid/expired token, insufficient scopes, network failure, or Linode API error — during Find.
Common situations: Expired LINODE_TOKEN, a token without account read scope, firewall/proxy blocking api.linode.com from a CI environment.
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/de8832f9de802d93.
Report an issue: GitHub.