{"record":{"id":"7af134bedfb6f417","repo":"kubernetes/kops","slug":"instancegroup-q-not-found-7af134","errorCode":null,"errorMessage":"InstanceGroup %q not found","messagePattern":"InstanceGroup %q not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/kops/edit_instancegroup.go","lineNumber":145,"sourceCode":"\t\treturn err\n\t}\n\n\tclientset, err := f.KopsClient()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tchannel, err := cloudup.ChannelForCluster(clientset.VFSContext(), cluster)\n\tif err != nil {\n\t\tklog.Warningf(\"%v\", err)\n\t}\n\n\toldGroup, err := clientset.InstanceGroupsFor(cluster).Get(ctx, groupName, metav1.GetOptions{})\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error reading InstanceGroup %q: %v\", groupName, err)\n\t}\n\tif oldGroup == nil {\n\t\treturn fmt.Errorf(\"InstanceGroup %q not found\", groupName)\n\t}\n\n\tif len(options.Unsets)+len(options.Sets) > 0 {\n\t\tnewGroup := oldGroup.DeepCopy()\n\t\tif err := commands.UnsetInstancegroupFields(options.Unsets, newGroup); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := commands.SetInstancegroupFields(options.Sets, newGroup); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tfailure, err := updateInstanceGroup(ctx, clientset, channel, cluster, newGroup)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif failure != \"\" {\n\t\t\treturn fmt.Errorf(\"%s\", failure)\n\t\t}","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/cmd/kops/edit_instancegroup.go#L127-L163","documentation":"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.","triggerScenarios":"Thrown at cmd/kops/edit_instancegroup.go:145 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}