kubernetes/kops · critical
no instance group defined in nodeup config
Error message
no instance group defined in nodeup config
What it means
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.
Source
Thrown at upup/pkg/fi/nodeup/command.go:158
nodeupConfigHash = sha256.Sum256([]byte(nodeConfig.NodeupConfig))
if nodeupConfig.CAs == nil {
nodeupConfig.CAs = make(map[string]string)
}
nodeupConfig.CAs[fi.CertificateIDCA] = bootConfig.ConfigServer.CACertificates
case bootConfig.InstanceGroupName != "":
nodeupConfigLocation := configBase.Join("igconfig", bootConfig.InstanceGroupRole.ToLowerString(), bootConfig.InstanceGroupName, "nodeupconfig.yaml")
b, err := nodeupConfigLocation.ReadFile(ctx)
if err != nil {
return fmt.Errorf("error loading NodeupConfig %q: %v", nodeupConfigLocation, err)
}
if err = utils.YamlUnmarshal(b, &nodeupConfig); err != nil {
return fmt.Errorf("error parsing NodeupConfig %q: %v", nodeupConfigLocation, err)
}
nodeupConfigHash = sha256.Sum256(b)
default:
return fmt.Errorf("no instance group defined in nodeup config")
}
if bootConfig.NodeupConfigHash != "" {
if want, got := bootConfig.NodeupConfigHash, base64.StdEncoding.EncodeToString(nodeupConfigHash[:]); got != want {
return fmt.Errorf("nodeup config hash mismatch (was %q, expected %q)", got, want)
}
}
err = evaluateSpec(&nodeupConfig, bootConfig.CloudProvider, region)
if err != nil {
return err
}
architecture, err := architectures.FindArchitecture()
if err != nil {
return fmt.Errorf("error determining OS architecture: %v", err)
}
View on GitHub (pinned to 4c8573c808)
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.
Example fix
// before (boot config yaml) configBase: s3://bucket/cluster.k8s.local // after configBase: s3://bucket/cluster.k8s.local instanceGroupName: nodes
Defensive patterns
Strategy: validation
Validate before calling
// Ensure the boot config carries either a config server or an instance group
if bootConfig.ConfigServer == nil || len(bootConfig.ConfigServer.Servers) == 0 {
if bootConfig.InstanceGroupName == "" {
return fmt.Errorf("boot config must set ConfigServer or InstanceGroupName")
}
} Try / catch
err := cmd.Run(out)
if err != nil && strings.Contains(err.Error(), "no instance group defined") {
// re-render userdata/boot config with InstanceGroupName set
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- SecretStore not set
- building nodeConfig for instanceGroup: %w
- unsupported cloud provider for authenticator %q
- no keypairID for %q
- KubeProxy not configured
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/4c6927c2dcea0e22.
Report an issue: GitHub.