kubernetes/kops · error
failed to find instance group of resource %q: %v
Error message
failed to find instance group of resource %q: %v
What it means
Fires in buildCloudInstanceGroupFromResource when findInstanceGroupFromResource cannot match the spotinst cloud resource (instance group or launch spec) to any kops InstanceGroup by name — the cluster manifest lacks an instance group corresponding to the discovered cloud resource.
Source
Thrown at pkg/resources/spotinst/resources.go:250
klog.V(2).Infof("Found group with no corresponding instance group: %q", resource.Name)
}
continue
}
cloudInstanceGroups[resource.Name] = ig
}
return cloudInstanceGroups, nil
}
func buildCloudInstanceGroupFromResource(cloud Cloud, cluster *kops.Cluster,
instanceGroups []*kops.InstanceGroup, resource *resources.Resource,
nodeMap map[string]*v1.Node) (*cloudinstances.CloudInstanceGroup, error,
) {
// Find corresponding instance group.
ig, err := findInstanceGroupFromResource(cluster, instanceGroups, resource)
if err != nil {
return nil, fmt.Errorf("failed to find instance group of resource %q: %v", resource.Name, err)
}
if ig == nil {
return nil, nil
}
switch ResourceType(resource.Type) {
case ResourceTypeInstanceGroup:
{
if group, ok := resource.Obj.(InstanceGroup); ok {
return buildCloudInstanceGroupFromInstanceGroup(cloud, ig, group, nodeMap)
}
}
case ResourceTypeLaunchSpec:
{
if spec, ok := resource.Obj.(LaunchSpec); ok {
return buildCloudInstanceGroupFromLaunchSpec(cloud, ig, spec, nodeMap)
}View on GitHub (pinned to 4c8573c808)
Solutions
- Align the spotinst group/launch spec name with a kops InstanceGroup name in the cluster spec
- Remove the orphaned spotinst resource from the ElastiGroup config
- Re-run after updating the cluster manifest so names match
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at pkg/resources/spotinst/resources.go:250 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/e71c8346f4f29a11.
Report an issue: GitHub.