kubernetes/kops · error

missing instance id: %s

Error message

missing instance id: %s

What it means

DescribeInstances succeeded but returned no reservations/instances for the given instance ID: the EC2 instance no longer exists (or is in another account/region). A not-found guard for the node's backing instance.

Source

Thrown at pkg/nodeidentity/aws/identify.go:174

		}
	}

	return info, nil
}

// getInstance queries EC2 for the instance with the specified ID, returning an error if not found
func (i *nodeIdentifier) getInstance(ctx context.Context, instanceID string) (*ec2types.Instance, error) {
	// Based on node-authorizer code
	resp, err := i.ec2Client.DescribeInstances(ctx, &ec2.DescribeInstancesInput{
		InstanceIds: []string{instanceID},
	})
	if err != nil {
		return nil, fmt.Errorf("error from ec2 DescribeInstances request: %v", err)
	}

	// @check we found some instances
	if len(resp.Reservations) == 0 || len(resp.Reservations[0].Instances) == 0 {
		return nil, fmt.Errorf("missing instance id: %s", instanceID)
	}
	if len(resp.Reservations[0].Instances) > 1 {
		return nil, fmt.Errorf("found multiple instances with instance id: %s", instanceID)
	}

	instance := resp.Reservations[0].Instances[0]
	return &instance, nil
}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Delete the stale Kubernetes Node object if the instance was terminated
  2. Verify kOps and the node use the same AWS account/region
  3. Re-create the instance/instance-group if it was deleted unintentionally
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at pkg/nodeidentity/aws/identify.go:174 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/8a05b78d7f94d912. Report an issue: GitHub.