kubernetes/kops · error
error searching for detached instances: %v
Error message
error searching for detached instances: %v
What it means
Residual error guard after scanning the instance map for the kOps detached-instance tag: an earlier DescribeInstances-style error (stored in err) surfaces here, aborting the detached-instance handling in awsBuildCloudInstanceGroup.
Source
Thrown at upup/pkg/fi/cloudup/awsup/aws_cloud.go:1038
if err != nil {
return nil, err
}
for _, i := range result.Instances {
err := buildCloudInstance(i, instances, instanceSeen, nodeMap, cg, newConfigName)
if err != nil {
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 == "" {View on GitHub (pinned to 4c8573c808)
Solutions
- Inspect the wrapped %v error to find the failing AWS call
- Verify ec2:DescribeInstances permissions for the credentials
- Retry the read-only operation once transient AWS errors clear
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at upup/pkg/fi/cloudup/awsup/aws_cloud.go:1038 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/c9fcbee8b292a786.
Report an issue: GitHub.