{"record":{"id":"028b962a84d935dd","repo":"kubernetes/kops","slug":"building-nodeconfig-for-instancegroup-w","errorCode":null,"errorMessage":"building nodeConfig for instanceGroup: %w","messagePattern":"building nodeConfig for instanceGroup: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/kops-controller/pkg/server/node_config.go","lineNumber":88,"sourceCode":"\t\tconfigBuilder.InstanceGroupName = instanceGroupName\n\t} else {\n\t\t// Note: For now, we're assuming there is only a single cluster, and it is ours.\n\t\t// We therefore use the configured base path\n\n\t\tp := s.configBase.Join(\"igconfig\", \"node\", instanceGroupName, \"nodeupconfig.yaml\")\n\n\t\tb, err := p.ReadFile(ctx)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error loading NodeupConfig %q: %v\", p, err)\n\t\t}\n\t\tnodeConfig = &nodeup.NodeConfig{}\n\t\tnodeConfig.NodeupConfig = string(b)\n\t}\n\n\tif nodeConfig == nil {\n\t\tbootstrapData, err := configBuilder.GetBootstrapData(ctx)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"building nodeConfig for instanceGroup: %w\", err)\n\t\t}\n\t\tnodeupConfig, err := json.Marshal(bootstrapData.NodeupConfig)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"marshalling nodeupConfig: %w\", err)\n\t\t}\n\t\tnodeConfig = &nodeup.NodeConfig{}\n\t\tnodeConfig.NodeupConfig = string(nodeupConfig)\n\t}\n\n\t{\n\t\tsecretIDs := []string{\n\t\t\t\"dockerconfig\",\n\t\t}\n\t\tnodeConfig.NodeSecrets = make(map[string][]byte)\n\t\tfor _, id := range secretIDs {\n\t\t\tsecret, err := s.secretStore.FindSecret(id)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"error loading secret %q: %w\", id, err)","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/cmd/kops-controller/pkg/server/node_config.go#L70-L106","documentation":"getNodeConfig builds a nodeup.NodeConfig for a CAPI machine's instance group. When the configBuilder cannot produce bootstrap data for the instance group, the underlying error is wrapped with this message, indicating the failure happened while building nodeConfig for that instance group.","triggerScenarios":"configBuilder.GetBootstrapData(ctx) returns any error (missing nodeup config, VFS/keystore read failure, malformed cluster state) while handling a bootstrap request that did not include an embedded nodeConfig.","commonSituations":"Cluster state in ConfigBase is incomplete or unreadable; nodeup config for the instance group was never generated; keystore/secret store misconfigured; operator changed ConfigBase after cluster creation.","solutions":["Inspect the wrapped cause (%w) to identify the actual GetBootstrapData failure","Verify --config-base points to valid, readable cluster state","Re-run kops update/replace to regenerate the nodeup config","Check keystore and secret store paths/permissions on the controller"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// verify cluster state reachable before bootstrap\nif _, err := os.Stat(configBasePath); err != nil { return fmt.Errorf(\"config base unavailable: %w\", err) }","typeGuard":null,"tryCatchPattern":"nodeConfig, err := getNodeConfig(ctx, ...)\nif err != nil {\n    if strings.Contains(err.Error(), \"building nodeConfig for instanceGroup\") {\n        klog.ErrorS(err, \"bootstrap data build failed; check cluster state and keystore\")\n    }\n    return err\n}","preventionTips":["Verify --config-base and --secret-store resolve before startup","Keep kops-controller and nodeup versions in sync","Monitor keystore/secret store backend health"],"tags":["go","bootstrap","nodeup","config"],"backgroundTag":"bootstrap-data-build-failed","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"}