{"record":{"id":"5820857648dc3415","repo":"kubernetes/kops","slug":"error-loading-nodeupconfig-q-v","errorCode":null,"errorMessage":"error loading NodeupConfig %q: %v","messagePattern":"error loading NodeupConfig %q: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/kops-controller/pkg/server/node_config.go","lineNumber":79,"sourceCode":"\tif identity.CAPIMachine != nil && instanceGroupName == \"\" {\n\t\t// We have a CAPI Machine (but no instance group)\n\t\tinstanceGroup, err := s.buildInstanceGroupFromCAPI(ctx, identity.CAPIMachine)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error building InstanceGroup from CAPI Machine: %w\", err)\n\t\t}\n\t\tlog.Info(\"built InstanceGroup from CAPI Machine\", \"instanceGroup\", instanceGroup)\n\t\tconfigBuilder.InstanceGroup = instanceGroup\n\t} else if s.opt.Cloud == \"metal\" {\n\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","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/cmd/kops-controller/pkg/server/node_config.go#L61-L97","documentation":"On the non-CAPI path, getNodeConfig reads the per-InstanceGroup nodeup config from the state store at configBase/igconfig/node/<instanceGroupName>/nodeupconfig.yaml. If that read fails (file missing, state store unreachable, wrong cluster path) the error is wrapped as \"error loading NodeupConfig\" with the path and cause. This typically means the cluster's published configuration is incomplete or the controller cannot reach the state store.","triggerScenarios":"p.ReadFile(ctx) fails for <configBase>/igconfig/node/<ig>/nodeupconfig.yaml — object absent from state store (S3/GCS/etc.), state store credentials/network failure, or the instanceGroup name resolved during bootstrap does not match any directory that kops update published.","commonSituations":"Cluster spec changed but `kops update cluster --yes` (which writes nodeupconfig.yaml) was never run; node reporting an old/renamed InstanceGroup name whose config was deleted; state store bucket permissions or region misconfiguration on kops-controller; S3 eventual consistency/replication issues in multi-region setups.","solutions":["Run `kops update cluster <name> --yes` (and `kops rolling-update cluster` if needed) to republish the nodeup configs to the state store","Verify the state store location in the kops-controller flags/env is correct and credentials allow reading objects under configBase","Check that an object exists at igconfig/node/<instanceGroupName>/nodeupconfig.yaml; if the IG was renamed, ensure nodes boot from the current IG","Inspect the wrapped %v error: NotFound → republish config; AccessDenied → fix IAM; timeout → fix network to the state store"],"exampleFix":"// before: node boots against stale IG name\n// state store lacks igconfig/node/old-nodes/nodeupconfig.yaml\n// after: republish and recreate nodes\nkops update cluster mycluster.k8s.local --yes\nkops rolling-update cluster mycluster.k8s.local --yes","handlingStrategy":"retry","validationCode":"// pre-flight: confirm the nodeup config object exists in the state store\n_, err := store.Read(ctx, \"igconfig/node/\"+igName+\"/nodeupconfig.yaml\")","typeGuard":null,"tryCatchPattern":"if strings.Contains(err.Error(), \"error loading NodeupConfig\") {\n\t// retry with backoff (state store may be temporarily unavailable),\n\t// else re-run `kops update cluster --yes` to republish configs\n}","preventionTips":["Always run `kops update cluster --yes` after cluster spec changes so nodeupconfig.yaml is published","Monitor state store availability and IAM permissions from kops-controller","Recreate nodes after InstanceGroup renames so they fetch the correct config","Pin kops-controller's configBase to the correct cluster state store path"],"tags":["kubernetes","kops","state-store","bootstrap","s3"],"backgroundTag":"config-file-not-found","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"}