kubernetes/kops · error
error loading NodeupConfig %q: %v
Error message
error loading NodeupConfig %q: %v
What it means
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.
Source
Thrown at cmd/kops-controller/pkg/server/node_config.go:79
if identity.CAPIMachine != nil && instanceGroupName == "" {
// We have a CAPI Machine (but no instance group)
instanceGroup, err := s.buildInstanceGroupFromCAPI(ctx, identity.CAPIMachine)
if err != nil {
return nil, fmt.Errorf("error building InstanceGroup from CAPI Machine: %w", err)
}
log.Info("built InstanceGroup from CAPI Machine", "instanceGroup", instanceGroup)
configBuilder.InstanceGroup = instanceGroup
} else if s.opt.Cloud == "metal" {
configBuilder.InstanceGroupName = instanceGroupName
} else {
// Note: For now, we're assuming there is only a single cluster, and it is ours.
// We therefore use the configured base path
p := s.configBase.Join("igconfig", "node", instanceGroupName, "nodeupconfig.yaml")
b, err := p.ReadFile(ctx)
if err != nil {
return nil, fmt.Errorf("error loading NodeupConfig %q: %v", p, err)
}
nodeConfig = &nodeup.NodeConfig{}
nodeConfig.NodeupConfig = string(b)
}
if nodeConfig == nil {
bootstrapData, err := configBuilder.GetBootstrapData(ctx)
if err != nil {
return nil, fmt.Errorf("building nodeConfig for instanceGroup: %w", err)
}
nodeupConfig, err := json.Marshal(bootstrapData.NodeupConfig)
if err != nil {
return nil, fmt.Errorf("marshalling nodeupConfig: %w", err)
}
nodeConfig = &nodeup.NodeConfig{}
nodeConfig.NodeupConfig = string(nodeupConfig)
}
View on GitHub (pinned to 4c8573c808)
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
Example fix
// before: node boots against stale IG name // state store lacks igconfig/node/old-nodes/nodeupconfig.yaml // after: republish and recreate nodes kops update cluster mycluster.k8s.local --yes kops rolling-update cluster mycluster.k8s.local --yes
Defensive patterns
Strategy: retry
Validate before calling
// pre-flight: confirm the nodeup config object exists in the state store _, err := store.Read(ctx, "igconfig/node/"+igName+"/nodeupconfig.yaml")
Try / catch
if strings.Contains(err.Error(), "error loading NodeupConfig") {
// retry with backoff (state store may be temporarily unavailable),
// else re-run `kops update cluster --yes` to republish configs
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "Config file not found": what it means and how to fix it in docker-sync, Maven, Vagrant, Turborepo and other tools — this error's family across 60 libraries.
Related errors
- node identity is required
- did not find owner for node %q
- error building InstanceGroup from CAPI Machine: %w
- building bootstrap data: %w
- invalid InstanceGroup name: %v
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/5820857648dc3415.
Report an issue: GitHub.