{"record":{"id":"6803c9697e21c0ff","repo":"kubernetes/kops","slug":"error-fetching-cluster-q-v","errorCode":null,"errorMessage":"error fetching cluster %q: %v","messagePattern":"error fetching cluster %q: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/kops/get_instancegroups.go","lineNumber":99,"sourceCode":"\t\t\treturn completeInstanceGroup(f, &args, nil)(cmd, nil, toComplete)\n\t\t},\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\treturn RunGetInstanceGroups(cmd.Context(), f, out, &options)\n\t\t},\n\t}\n\n\treturn cmd\n}\n\nfunc RunGetInstanceGroups(ctx context.Context, f commandutils.Factory, out io.Writer, options *GetInstanceGroupsOptions) error {\n\tclientset, err := f.KopsClient()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tcluster, err := clientset.GetCluster(ctx, options.ClusterName)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error fetching cluster %q: %v\", options.ClusterName, err)\n\t}\n\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","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/cmd/kops/get_instancegroups.go#L81-L117","documentation":"RunGetInstanceGroups resolves the cluster by name from the state store; this wraps GetCluster erroring - state store unreachable, permissions, or a malformed cluster config. It fires before any 'not found' check.","triggerScenarios":"Thrown at cmd/kops/get_instancegroups.go:99 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped error for the state store failure reason","Verify the cluster name and state store access","Check credentials for the backing object store (S3/GCS)"],"exampleFix":null,"handlingStrategy":"try-catch","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"}