kubernetes/kops · error
error adding asset %q: %v
Error message
error adding asset %q: %v
What it means
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.
Source
Thrown at upup/pkg/fi/nodeup/command.go:187
return err
}
architecture, err := architectures.FindArchitecture()
if err != nil {
return fmt.Errorf("error determining OS architecture: %v", err)
}
distribution, err := distributions.FindDistribution("/")
if err != nil {
return fmt.Errorf("error determining OS distribution: %v", err)
}
configAssets := nodeupConfig.Assets[architecture]
assetStore := fi.NewAssetStore(c.CacheDir)
for _, asset := range configAssets {
err := assetStore.Add(ctx, asset)
if err != nil {
return fmt.Errorf("error adding asset %q: %v", asset, err)
}
}
// cloud holds the AWS clients, on AWS only.
var cloud *awsup.Cloud
if bootConfig.CloudProvider == api.CloudProviderAWS {
cloud, err = awsup.NewCloud(ctx, region)
if err != nil {
return err
}
}
modelContext := &model.NodeupModelContext{
Cloud: cloud,
Architecture: architecture,
Assets: assetStore,
ConfigBase: configBase,View on GitHub (pinned to 4c8573c808)
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.
Example fix
// before: cluster spec asset URL unreachable from private subnet // after: mirror assets locally and re-apply kops set cluster cluster.spec.assets.containerRegistry=mirror.example.com/kops kops update cluster --yes
Defensive patterns
Strategy: retry
Validate before calling
// Pre-flight: check the asset URL is reachable and hash matches before running nodeup
resp, err := http.Head(assetURL)
if err != nil || resp.StatusCode != http.StatusOK {
return fmt.Errorf("asset unreachable: %s", assetURL)
} Try / catch
err := cmd.Run(out)
if err != nil && strings.Contains(err.Error(), "error adding asset") {
// clear the cache dir and retry with backoff; verify egress/mirror
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- unable to find any containerd binaries in assets
- error finding runc asset
- unable to locate asset %q
- trying to locate asset %q: %v
- unable to locate asset %q
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/77c56694582a730a.
Report an issue: GitHub.