kubernetes/kops · error
error getting instance group for ASG %q
Error message
error getting instance group for ASG %q
What it means
matchInstanceGroup could not unambiguously map an AWS AutoScalingGroup name to a kops InstanceGroup (it returns an error when multiple instance groups match the ASG name). The ASG name is the input at fault; the underlying matcher error is discarded by this wrapping.
Source
Thrown at upup/pkg/fi/cloudup/awsup/aws_cloud.go:806
return karpenterGroup, nil
}
func getCloudGroups(ctx context.Context, c AWSCloud, cluster *kops.Cluster, instancegroups []*kops.InstanceGroup, warnUnmatched bool, nodes []v1.Node) (map[string]*cloudinstances.CloudInstanceGroup, error) {
nodeMap := cloudinstances.GetNodeMap(nodes, cluster)
groups := make(map[string]*cloudinstances.CloudInstanceGroup)
asgs, err := FindAutoscalingGroups(c, c.Tags())
if err != nil {
return nil, fmt.Errorf("unable to find autoscale groups: %v", err)
}
for _, asg := range asgs {
name := aws.ToString(asg.AutoScalingGroupName)
instancegroup, err := matchInstanceGroup(name, cluster.ObjectMeta.Name, instancegroups)
if err != nil {
return nil, fmt.Errorf("error getting instance group for ASG %q", name)
}
if instancegroup == nil {
if warnUnmatched {
klog.Warningf("Found ASG with no corresponding instance group %q", name)
}
continue
}
groups[instancegroup.ObjectMeta.Name], err = awsBuildCloudInstanceGroup(ctx, c, cluster, instancegroup, asg, nodeMap)
if err != nil {
return nil, fmt.Errorf("error getting cloud instance group %q: %v", instancegroup.ObjectMeta.Name, err)
}
}
return groups, nil
}
// FindAutoscalingGroups finds autoscaling groups matching the specified tagsView on GitHub (pinned to 4c8573c808)
Solutions
- List the cluster's instance groups and rename or delete the duplicate ones that match the reported ASG name
- Check for leftover ASGs from a previous cluster with the same name and delete stale ASGs via the AWS console or CLI
- Run 'kops get ig' to inspect instance group names for collisions
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at upup/pkg/fi/cloudup/awsup/aws_cloud.go:806 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/38d54546f927093e.
Report an issue: GitHub.