kubernetes/kops · error

error retrieving SSH public key %q: %v

Error message

error retrieving SSH public key %q: %v

What it means

sshCredentialStore.FindSSHPublicKeys failed while listing the admin SSH public keys from the state store — a read/transport error on the secret store, not a missing key.

Source

Thrown at upup/pkg/fi/cloudup/apply_cluster.go:408

		if err != nil {
			return nil, fmt.Errorf("could not load the ciliumpassword secret: %w", err)
		}
		if secret == nil {
			fmt.Println("")
			fmt.Println("You have cilium encryption enabled, but no ciliumpassword secret has been set.")
			fmt.Println("See `kops create secret ciliumpassword -h`")
			return nil, fmt.Errorf("could not find ciliumpassword secret")
		}
	}

	project := ""
	scwZone := ""

	var sshPublicKeys [][]byte
	{
		keys, err := sshCredentialStore.FindSSHPublicKeys()
		if err != nil {
			return nil, fmt.Errorf("error retrieving SSH public key %q: %v", fi.SecretNameSSHPrimary, err)
		}

		for _, k := range keys {
			sshPublicKeys = append(sshPublicKeys, []byte(k.Spec.PublicKey))
		}
	}

	allInstanceGroups := c.InstanceGroups
	filteredInstanceGroups := predicates.Filter(allInstanceGroups, c.InstanceGroupFilter)

	modelContext := &model.KopsModelContext{
		IAMModelContext:   iam.IAMModelContext{Cluster: cluster},
		InstanceGroups:    filteredInstanceGroups,
		AllInstanceGroups: allInstanceGroups,
		AdditionalObjects: c.AdditionalObjects,
	}

	switch cluster.GetCloudProvider() {

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Verify KOPS_STATE_STORE points to the correct, reachable bucket
  2. Check bucket permissions and network access, then retry the operation
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/apply_cluster.go:408 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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