{"record":{"id":"4c6927c2dcea0e22","repo":"kubernetes/kops","slug":"no-instance-group-defined-in-nodeup-config","errorCode":null,"errorMessage":"no instance group defined in nodeup config","messagePattern":"no instance group defined in nodeup config","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"upup/pkg/fi/nodeup/command.go","lineNumber":158,"sourceCode":"\t\tnodeupConfigHash = sha256.Sum256([]byte(nodeConfig.NodeupConfig))\n\t\tif nodeupConfig.CAs == nil {\n\t\t\tnodeupConfig.CAs = make(map[string]string)\n\t\t}\n\t\tnodeupConfig.CAs[fi.CertificateIDCA] = bootConfig.ConfigServer.CACertificates\n\tcase bootConfig.InstanceGroupName != \"\":\n\t\tnodeupConfigLocation := configBase.Join(\"igconfig\", bootConfig.InstanceGroupRole.ToLowerString(), bootConfig.InstanceGroupName, \"nodeupconfig.yaml\")\n\n\t\tb, err := nodeupConfigLocation.ReadFile(ctx)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error loading NodeupConfig %q: %v\", nodeupConfigLocation, err)\n\t\t}\n\n\t\tif err = utils.YamlUnmarshal(b, &nodeupConfig); err != nil {\n\t\t\treturn fmt.Errorf(\"error parsing NodeupConfig %q: %v\", nodeupConfigLocation, err)\n\t\t}\n\t\tnodeupConfigHash = sha256.Sum256(b)\n\tdefault:\n\t\treturn fmt.Errorf(\"no instance group defined in nodeup config\")\n\t}\n\n\tif bootConfig.NodeupConfigHash != \"\" {\n\t\tif want, got := bootConfig.NodeupConfigHash, base64.StdEncoding.EncodeToString(nodeupConfigHash[:]); got != want {\n\t\t\treturn fmt.Errorf(\"nodeup config hash mismatch (was %q, expected %q)\", got, want)\n\t\t}\n\t}\n\n\terr = evaluateSpec(&nodeupConfig, bootConfig.CloudProvider, region)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tarchitecture, err := architectures.FindArchitecture()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error determining OS architecture: %v\", err)\n\t}\n","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/nodeup/command.go#L140-L176","documentation":"NodeUpCommand.Run needs to load the NodeupConfig either from a config-server response (nodeConfig) or by joining an instance group name onto ConfigBase. This error means neither branch matched: bootConfig had no ConfigServer servers, no InstanceGroupName, so nodeup cannot know which instance group's nodeupconfig.yaml to fetch. Run aborts immediately at the switch's default case.","triggerScenarios":"Calling NodeUpCommand.Run() with a BootConfig where ConfigServer is nil/empty AND InstanceGroupName == \"\" — e.g. the nodeup boot config file passed via ConfigLocation (or nodeup.conf kernel args) omits both configServer and InstanceGroupName.","commonSituations":"Corrupted or truncated /etc/kubernetes/nodeup.conf or userdata-generated boot config on the node; templating in cloud-init/userdata failed to render InstanceGroupName; hand-built nodeup invocations in tests or custom installers that forgot to set the field.","solutions":["Set InstanceGroupName in the BootConfig handed to NodeUpCommand (or in the boot config YAML at ConfigLocation) to the node's instance group, e.g. \"nodes\" or \"master-us-east-1a\".","Alternatively configure ConfigServer (bootConfig.ConfigServer.Servers) so nodeup fetches its config from the kOps config server instead of VFS.","Inspect the node's boot configuration source (userdata / nodeup.conf) to find why the field is missing — often a broken templating step — and re-render and re-provision the node.","Ensure 'kops update cluster' ran so the state store and node userdata were generated by the same kOps version."],"exampleFix":"// before (boot config yaml)\nconfigBase: s3://bucket/cluster.k8s.local\n// after\nconfigBase: s3://bucket/cluster.k8s.local\ninstanceGroupName: nodes","handlingStrategy":"validation","validationCode":"// Ensure the boot config carries either a config server or an instance group\nif bootConfig.ConfigServer == nil || len(bootConfig.ConfigServer.Servers) == 0 {\n    if bootConfig.InstanceGroupName == \"\" {\n        return fmt.Errorf(\"boot config must set ConfigServer or InstanceGroupName\")\n    }\n}","typeGuard":null,"tryCatchPattern":"err := cmd.Run(out)\nif err != nil && strings.Contains(err.Error(), \"no instance group defined\") {\n    // re-render userdata/boot config with InstanceGroupName set\n}","preventionTips":["Always generate node userdata via 'kops update cluster' rather than hand-writing boot configs","Check rendered userdata in cloud-init logs on first boot for missing fields","Pin InstanceGroupName per instance group when building custom nodeup launches"],"tags":["nodeup","bootconfig","missing-config","bootstrap"],"backgroundTag":"missing-required-config-field","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"}