kubernetes/kops · error
InstanceGroup %q not found
Error message
InstanceGroup %q not found
What it means
Defensive check in RunEditInstanceGroup after Get: although the Get call is expected to return an error for a missing group (making this branch mostly unreachable), the code guards against a (nil, nil) result and reports that the named InstanceGroup does not exist in the cluster. If you see this, the group name given to `kops edit instancegroup` does not match any stored object.
Source
Thrown at cmd/kops/edit_instancegroup.go:145
return err
}
clientset, err := f.KopsClient()
if err != nil {
return err
}
channel, err := cloudup.ChannelForCluster(clientset.VFSContext(), cluster)
if err != nil {
klog.Warningf("%v", err)
}
oldGroup, err := clientset.InstanceGroupsFor(cluster).Get(ctx, groupName, metav1.GetOptions{})
if err != nil {
return fmt.Errorf("error reading InstanceGroup %q: %v", groupName, err)
}
if oldGroup == nil {
return fmt.Errorf("InstanceGroup %q not found", groupName)
}
if len(options.Unsets)+len(options.Sets) > 0 {
newGroup := oldGroup.DeepCopy()
if err := commands.UnsetInstancegroupFields(options.Unsets, newGroup); err != nil {
return err
}
if err := commands.SetInstancegroupFields(options.Sets, newGroup); err != nil {
return err
}
failure, err := updateInstanceGroup(ctx, clientset, channel, cluster, newGroup)
if err != nil {
return err
}
if failure != "" {
return fmt.Errorf("%s", failure)
}View on GitHub (pinned to 4c8573c808)
Solutions
- List instance groups (kops get ig --name <cluster>) to find the correct name
- Check the instance group name for typos
- Create the instance group first if it does not exist
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at cmd/kops/edit_instancegroup.go:145 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/7af134bedfb6f417.
Report an issue: GitHub.