{"record":{"id":"7b6262732211dfdc","repo":"kubernetes/kops","slug":"unknown-role-q","errorCode":null,"errorMessage":"unknown role %q","messagePattern":"unknown role %q","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/kops/create_instancegroup.go","lineNumber":203,"sourceCode":"\texisting, err := clientset.InstanceGroupsFor(cluster).Get(ctx, options.InstanceGroupName, metav1.GetOptions{})\n\tif err != nil {\n\t\t// We expect a NotFound error when creating the instance group\n\t\tif !errors.IsNotFound(err) {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tif existing != nil {\n\t\treturn fmt.Errorf(\"instance group %q already exists\", options.InstanceGroupName)\n\t}\n\n\t// Populate some defaults\n\tig := &kopsapi.InstanceGroup{}\n\tig.ObjectMeta.Name = options.InstanceGroupName\n\n\trole, ok := kopsapi.ParseInstanceGroupRole(options.Role, true)\n\tif !ok {\n\t\treturn fmt.Errorf(\"unknown role %q\", options.Role)\n\t}\n\tig.Spec.Role = role\n\n\tig.Spec.Subnets = options.Subnets\n\n\tig.Spec.Zones = options.Zones\n\n\tcloud, err := cloudup.BuildCloud(cluster)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tig, err = cloudup.PopulateInstanceGroupSpec(cluster, ig, cloud, channel)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tig.AddInstanceGroupNodeLabel()","sourceCodeStart":185,"sourceCodeEnd":221,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/cmd/kops/create_instancegroup.go#L185-L221","documentation":"RunCreateInstanceGroup parses the --role flag value with ParseInstanceGroupRole; the value supplied is not a recognized InstanceGroupRole (e.g. node, control-plane, bastion), so the IG cannot be built.","triggerScenarios":"Thrown at cmd/kops/create_instancegroup.go:203 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a valid role: control-plane, node, or bastion (case-insensitive)","Check the flag value 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-12T12:17:11.808Z"}