kubernetes/kops · error
SSH key %q not found in Akamai (Linode)
Error message
SSH key %q not found in Akamai (Linode)
What it means
After listing the account's SSH keys, resolveAuthorizedKeys looks up each name-referenced key in the label map. It throws this when no Linode SSH key with that label exists, so the key cannot be added to authorized_keys.
Source
Thrown at upup/pkg/fi/cloudup/linodetasks/instance.go:293
}
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.
func buildLinodeInterfaces(subnetID int, requirePublicInterface bool) []linodego.LinodeInterfaceCreateOptions {
var interfaces []linodego.LinodeInterfaceCreateOptions
if requirePublicInterface {
interfaces = append(interfaces, linodego.LinodeInterfaceCreateOptions{
Public: &linodego.PublicInterfaceCreateOptions{},
})
}
interfaces = append(interfaces, linodego.LinodeInterfaceCreateOptions{
VPC: &linodego.VPCInterfaceCreateOptions{SubnetID: subnetID},
})View on GitHub (pinned to 4c8573c808)
Solutions
- Upload the missing SSH key to the Linode account (linode-cli sshkeys create or the Cloud Manager)
- Correct the Name in the cluster spec to match the existing key label exactly
- Or replace the name reference with inline PublicKey content
Example fix
// before - name: my-ssh-key // after - name: my-ssh-key-prod # matches a key registered in the Linode account
Defensive patterns
Strategy: validation
Validate before calling
keys, _ := client.ListSSHKeys(ctx, nil)
for _, ref := range keyNameRefs {
if !slices.ContainsFunc(keys, func(k linodego.SSHKey) bool { return k.Label == ref }) {
return fmt.Errorf("SSH key %q not registered in Linode account", ref)
}
} Prevention
- Cross-check spec key names against `linode-cli sshkeys list` before applying
- Upload keys to Linode before referencing them by name
- Prefer inline PublicKey content to eliminate the lookup
When it happens
Trigger: A cluster spec AuthorizedKeys entry uses Name to reference a key whose label does not match any SSH key registered in the Linode account.
Common situations: Typo in the key name, the key was deleted from the Linode account, or the key exists in a different Linode account than the token targets.
Related errors
- error building Akamai (Linode) SSH key task: %w
- error rendering SSH key data: %w
- error listing Akamai (Linode) SSH keys: %w
- SSHKey.Name is required
- error listing Akamai (Linode) SSH keys: %w
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/f268a092427b346c.
Report an issue: GitHub.