kubernetes/kops · error
error creating cloud instance group member: %v
Error message
error creating cloud instance group member: %v
What it means
CloudInstanceGroup.NewCloudInstance rejected a detached EC2 instance ID (duplicate member or invalid ID) while registering instances tagged with the kOps detached-instance tag. The instance ID that failed registration is in the wrapped error.
Source
Thrown at upup/pkg/fi/cloudup/awsup/aws_cloud.go:1044
return nil, err
}
}
var detached []*string
for id, instance := range instances {
for _, tag := range instance.Tags {
if aws.ToString(tag.Key) == tagNameDetachedInstance {
detached = append(detached, aws.String(id))
}
}
}
if err != nil {
return nil, fmt.Errorf("error searching for detached instances: %v", err)
}
for _, id := range detached {
if id != nil && *id != "" && !instanceSeen[*id] {
cm, err := cg.NewCloudInstance(*id, cloudinstances.CloudInstanceStatusDetached, nodeMap[*id])
if err != nil {
return nil, fmt.Errorf("error creating cloud instance group member: %v", err)
}
instanceSeen[*id] = true
addCloudInstanceData(cm, instances[aws.ToString(id)])
}
}
return cg, nil
}
func buildCloudInstance(i autoscalingtypes.Instance, instances map[string]*ec2types.Instance, instanceSeen map[string]bool, nodeMap map[string]*v1.Node, cg *cloudinstances.CloudInstanceGroup, newConfigName string) error {
id := aws.ToString(i.InstanceId)
if id == "" {
klog.Warningf("ignoring instance with no instance id: %s in autoscaling group: %s", id, cg.HumanName)
return nil
}
instanceSeen[id] = true
// @step: check if the instance is terminating
if i.LifecycleState == autoscalingtypes.LifecycleStateTerminating {View on GitHub (pinned to 4c8573c808)
Solutions
- Check the wrapped error for duplicate instance registration and remove stale detached-instance tags from terminated instances
- Verify the detached instance still exists in EC2
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at upup/pkg/fi/cloudup/awsup/aws_cloud.go:1044 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/b94333e51f575281.
Report an issue: GitHub.