{"record":{"id":"300bc21f1ff8094a","repo":"kubernetes/kops","slug":"no-instancegroup-objects-found","errorCode":null,"errorMessage":"no InstanceGroup objects found","messagePattern":"no InstanceGroup objects found","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/kops/get_instancegroups.go","lineNumber":119,"sourceCode":"\n\tif cluster == nil {\n\t\treturn fmt.Errorf(\"cluster %q was not found\", options.ClusterName)\n\t}\n\n\tlist, err := clientset.InstanceGroupsFor(cluster).List(ctx, metav1.ListOptions{})\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tinstancegroups, err := filterInstanceGroupsByName(options.InstanceGroupNames, list.Items)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tsingleObject := false\n\n\tif len(instancegroups) == 0 {\n\t\treturn fmt.Errorf(\"no InstanceGroup objects found\")\n\t} else if len(instancegroups) == 1 {\n\t\tsingleObject = true\n\t}\n\n\tvar obj []runtime.Object\n\tif options.Output != OutputTable {\n\t\tfor _, c := range instancegroups {\n\t\t\tobj = append(obj, c)\n\t\t}\n\t}\n\n\tswitch options.Output {\n\tcase OutputTable:\n\t\treturn igOutputTable(cluster, instancegroups, out)\n\tcase OutputYaml:\n\t\treturn fullOutputYAML(out, obj...)\n\tcase OutputJSON:\n\t\treturn fullOutputJSON(out, singleObject, obj...)","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/cmd/kops/get_instancegroups.go#L101-L137","documentation":"RunGetInstanceGroups found the cluster but the InstanceGroup list (after filtering by any --name arguments) is empty. It fires when the cluster has no InstanceGroups stored, or when none of the explicitly requested instance group names match, so there is nothing to print.","triggerScenarios":"Thrown at cmd/kops/get_instancegroups.go:119 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Drop the name filters to list all instance groups in the cluster","Create an instance group (kops create ig) if the cluster has none","Check the filtered instance group names for typos"],"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"}