{"record":{"id":"8884d8bb9640dca4","repo":"kubernetes/kops","slug":"building-bootstrap-data-w","errorCode":null,"errorMessage":"building bootstrap data: %w","messagePattern":"building bootstrap data: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/controllers/clusterapi/kopsconfig_controller.go","lineNumber":223,"sourceCode":"\t\t// The machine image is chosen by the CAPI infrastructure provider and is not used for\n\t\t// nodeup config generation; the placeholder avoids resolving a default from the channel.\n\t\tig.Spec.Image = \"placeholder-image\"\n\n\t\tconfigBuilder.InstanceGroup = ig\n\t\tconfigBuilder.InstanceGroupName = ig.Name\n\t}\n\n\t{\n\t\tcloud, err := cloudup.BuildCloud(clusterInternal)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"building cloud: %w\", err)\n\t\t}\n\t\tconfigBuilder.Cloud = cloud\n\t}\n\n\tbootstrapData, err := configBuilder.GetBootstrapData(ctx)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"building bootstrap data: %w\", err)\n\t}\n\n\treturn bootstrapData.NodeupScript, nil\n}\n","sourceCodeStart":205,"sourceCodeEnd":228,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/controllers/clusterapi/kopsconfig_controller.go#L205-L228","documentation":"Thrown by buildBootstrapData when commands.ConfigBuilder.GetBootstrapData fails to render node bootstrap (nodeup) configuration for the placeholder node InstanceGroup (pkg/controllers/clusterapi/kopsconfig_controller.go:221-223). GetBootstrapData assembles the full nodeup config — cluster spec, instance group, cloud, well-known addresses and base64-encoded assets — so almost any inconsistency in these inputs or failure to fetch kops assets causes this wrap.","triggerScenarios":"GetBootstrapData fails because the kops clientset (r.clientset) cannot reach the state store / VFS to fetch assets or config, well-known service addresses are missing/invalid from KopsControlPlane status, the cluster spec is internally inconsistent (mismatched kubelet versions, invalid networking), or nodeup/asset resolution fails.","commonSituations":"KopsControlPlane status has not yet populated SystemEndpoints so required well-known addresses are empty; the kops state store (S3 bucket etc.) is unreachable or credentials are missing from the controller; cluster spec fields reference assets that don't exist; a kops version mismatch producing incompatible nodeup config.","solutions":["Read the wrapped error to find the concrete failure (asset fetch, config validation, VFS access, etc.).","Verify KopsControlPlane status.systemEndpoints contains kubeAPIServer and kopsController endpoints before this reconcile proceeds — if empty, the control plane is not ready and reconciliation will retry.","Check that the controller pod has valid credentials and network access to the kops state store (e.g. S3 bucket for AWS).","Ensure the kops controller binary version matches the cluster's kopsVersion so nodeup assets resolve correctly.","If the cluster spec is inconsistent, re-apply a kops-validated Cluster spec and let the reconciler retry."],"exampleFix":"// before: controller SA lacks state-store access (no AWS creds)\n// error: building bootstrap data: error reading nodeup asset\n// after: bind IRSA role to controller service account\nmetadata:\n  annotations:\n    eks.amazonaws.com/role-arn: arn:aws:iam::123456789012:role/kops-controller","handlingStrategy":"retry","validationCode":"// Pre-check that KopsControlPlane has the endpoints GetBootstrapData depends on\nif len(kopsControlPlane.Status.SystemEndpoints) == 0 {\n\treturn fmt.Errorf(\"KopsControlPlane %s/%s has no systemEndpoints yet; control plane not ready\", kopsControlPlane.Namespace, kopsControlPlane.Name)\n}\n// Pre-check state-store reachability from the controller\n// e.g. attempt a lightweight clientset list before generating bootstrap data","typeGuard":null,"tryCatchPattern":"data, err := r.buildBootstrapData(ctx, cluster, kopsControlPlane)\nif err != nil {\n\t// Most causes are transient (endpoints not ready, VFS blips) — requeue with backoff\n\treturn ctrl.Result{RequeueAfter: 30 * time.Second}, fmt.Errorf(\"building bootstrap data: %w\", err)\n}","preventionTips":["Verify KopsControlPlane status.systemEndpoints are populated (control plane ready) before node bootstrap is required.","Give the controller ServiceAccount credentials (IRSA/workload identity) for the kops state store.","Keep controller and cluster kops versions aligned so nodeup assets resolve.","Monitor state-store (S3/GCS) availability from the management cluster.","Requeue rather than crash-loop: bootstrap data generation depends on eventually-consistent status."],"tags":["kubernetes","kops","nodeup","bootstrap-data","state-store"],"backgroundTag":"bootstrap-data-generation-failed","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"}