{"record":{"id":"77c56694582a730a","repo":"kubernetes/kops","slug":"error-adding-asset-q-v","errorCode":null,"errorMessage":"error adding asset %q: %v","messagePattern":"error adding asset %q: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/nodeup/command.go","lineNumber":187,"sourceCode":"\t\treturn err\n\t}\n\n\tarchitecture, err := architectures.FindArchitecture()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error determining OS architecture: %v\", err)\n\t}\n\n\tdistribution, err := distributions.FindDistribution(\"/\")\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error determining OS distribution: %v\", err)\n\t}\n\n\tconfigAssets := nodeupConfig.Assets[architecture]\n\tassetStore := fi.NewAssetStore(c.CacheDir)\n\tfor _, asset := range configAssets {\n\t\terr := assetStore.Add(ctx, asset)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error adding asset %q: %v\", asset, err)\n\t\t}\n\t}\n\n\t// cloud holds the AWS clients, on AWS only.\n\tvar cloud *awsup.Cloud\n\n\tif bootConfig.CloudProvider == api.CloudProviderAWS {\n\t\tcloud, err = awsup.NewCloud(ctx, region)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tmodelContext := &model.NodeupModelContext{\n\t\tCloud:        cloud,\n\t\tArchitecture: architecture,\n\t\tAssets:       assetStore,\n\t\tConfigBase:   configBase,","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/nodeup/command.go#L169-L205","documentation":"nodeup populates an AssetStore (backed by c.CacheDir) with the assets listed in nodeupConfig.Assets[architecture] — the kubectl/kubelet/cni binaries and container images required on the node. Each asset is fetched (download from HTTP URL or loaded from the config store) and hash-verified. This error means one asset could not be added: the download failed, the expected hash didn't match, or the cached/remote source was unreadable.","triggerScenarios":"Running NodeUpCommand.Run() where an entry in nodeupConfig.Assets for the detected architecture fails in assetStore.Add — unreachable download URL (restricted egress, wrong region), corrupted cache file in c.CacheDir, or SHA mismatch between the downloaded blob and the hash embedded in the asset string.","commonSituations":"Private clusters with no internet egress and no mirrored assets in the state store; object-store or CDN serving truncated/corrupted artifacts; kOps upgrade changing asset URLs/hashes while a proxy caches the old content; wrong architecture assets listed for the node.","solutions":["Check network egress from the node to the asset URL in the error message; for private clusters, mirror assets into the cluster's state store/asset mirror and reference them in the cluster spec.","Clear the nodeup asset cache directory (c.CacheDir, e.g. /var/cache/nodeup) to remove corrupted cached files and re-run nodeup.","Verify the asset hash in the cluster spec matches the published artifact (sha256) — re-run 'kops update cluster' to regenerate nodeupconfig.yaml if kOps was upgraded.","Confirm the Assets map has entries for the node's detected architecture (amd64/arm64); fix the instance group image/architecture if assets are missing for it."],"exampleFix":"// before: cluster spec asset URL unreachable from private subnet\n// after: mirror assets locally and re-apply\nkops set cluster cluster.spec.assets.containerRegistry=mirror.example.com/kops\nkops update cluster --yes","handlingStrategy":"retry","validationCode":"// Pre-flight: check the asset URL is reachable and hash matches before running nodeup\nresp, err := http.Head(assetURL)\nif err != nil || resp.StatusCode != http.StatusOK {\n    return fmt.Errorf(\"asset unreachable: %s\", assetURL)\n}","typeGuard":null,"tryCatchPattern":"err := cmd.Run(out)\nif err != nil && strings.Contains(err.Error(), \"error adding asset\") {\n    // clear the cache dir and retry with backoff; verify egress/mirror\n}","preventionTips":["Mirror kOps assets into your state store/VPC for private clusters","Clear the nodeup cache dir when switching kOps versions","Verify sha256 of published assets matches the cluster spec after upgrades"],"tags":["nodeup","assets","download","hash-mismatch"],"backgroundTag":"asset-download-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"}