kubernetes/kops · error

found instance %q with unexpected status: %q

Error message

found instance %q with unexpected status: %q

What it means

IdentifyNode rejects instances whose Linode status is not one of the expected provisioning/running states (checked via isExpectedInstanceStatus). A node in an unexpected state (e.g. shutting down, deleted, or maintenance) cannot be reliably identified, so the lookup fails until the instance reaches an expected state. Common situations: the Linode is being deleted while nodeup still runs; a rebuild/migration leaves it in a transitional state; a stale cache entry points to a dead instance. Solutions: check the instance's status in the Linode/Akamai console or via `linode-cli linodes view <id>`; wait for the instance to reach a running/provisioning state and retry; if the instance is deleted, remove the Node object from the cluster; verify isExpectedInstanceStatus covers any new status values introduced by the provider; ensure the node's providerID maps to the correct instance ID.

Source

Thrown at pkg/nodeidentity/linode/identify.go:105

		obj, exists, err := i.cache.GetByKey(instanceID)
		if err != nil {
			klog.Warningf("Nodeidentity info cache lookup failure: %v", err)
		}
		if exists {
			return obj.(*nodeidentity.Info), nil
		}
	}

	instance, err := i.client.GetInstance(ctx, instanceNumericID)
	if err != nil {
		return nil, fmt.Errorf("failed to get info for Akamai (Linode) instance %q: %w", instanceID, err)
	}
	if instance == nil {
		return nil, fmt.Errorf("failed to get info for Akamai (Linode) instance %q: empty response", instanceID)
	}

	if !isExpectedInstanceStatus(instance.Status) {
		return nil, fmt.Errorf("found instance %q with unexpected status: %q", instanceID, instance.Status)
	}

	info := &nodeidentity.Info{
		InstanceID: instanceID,
		Labels:     buildLabelsFromTags(instance.Tags),
	}

	if i.cacheEnabled {
		if err := i.cache.Add(info); err != nil {
			klog.Warningf("Failed to add node identity info to cache: %v", err)
		}
	}

	return info, nil
}

// parseInstanceIDFromProviderID extracts the numeric instance ID and string ID from a provider ID.
// It supports formats like "linode://123", "linode:///123", and "linode://region/123".

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Inspect the instance in the Akamai Cloud console or `linode-cli linodes view <id>` to see its actual status and event/error logs
  2. Verify nodeup/kubelet are not crash-looping (insufficient memory, bad userdata) and that the Linode finished provisioning
  3. If the instance is stuck in a transitional state (booting, rebuilding, migrating), wait for it to settle or delete the node so kOps can replace it
  4. If the status cache is stale, restart the node/kops-controller so IdentifyNode re-queries the Linode API
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at pkg/nodeidentity/linode/identify.go:105 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/44c0d18f08c0c4f3. Report an issue: GitHub.