kubernetes/kops · error
trying to locate asset %q: %v
Error message
trying to locate asset %q: %v
What it means
In the kubelet model builder, nodeup locates the `kubelet` binary asset with b.Assets.Find. If Find returns an error (I/O failure reading the on-disk asset or mirror, per the TODO noting it finds files on disk and cannot be mocked), the error is wrapped with this message.
Source
Thrown at nodeup/pkg/model/kubelet.go:168
c.AddTask(t)
}
{
t, err := b.buildSystemdEnvironmentFile(c.Context(), kubeletConfig)
if err != nil {
return err
}
c.AddTask(t)
}
{
// @TODO Extract to common function?
assetName := "kubelet"
assetPath := ""
// @TODO make Find call to an interface, we cannot mock out this function because it finds a file on disk
asset, err := b.Assets.Find(assetName, assetPath)
if err != nil {
return fmt.Errorf("trying to locate asset %q: %v", assetName, err)
}
if asset == nil {
return fmt.Errorf("unable to locate asset %q", assetName)
}
c.AddTask(&nodetasks.File{
Path: b.kubeletPath(),
Contents: asset,
Type: nodetasks.FileType_File,
Mode: s("0755"),
})
}
{
if kubeletConfig.PodManifestPath != "" {
t, err := b.buildManifestDirectory(kubeletConfig)
if err != nil {
return err
}View on GitHub (pinned to 4c8573c808)
Solutions
- Read the wrapped %v cause to distinguish filesystem vs download errors.
- Verify the kubelet binary is present and readable in the asset mirror/cache.
- Fix permissions on the nodeup assets/cache directory.
- Re-upload or re-download assets, then retry nodeup.
Example fix
// before chmod 700 /var/cache/nodeup/assets // after chmod 755 /var/cache/nodeup/assets
Defensive patterns
Strategy: validation
Validate before calling
// check kubelet asset cache readability before nodeup
info, err := os.Stat(filepath.Join(cacheDir, "kubelet"))
if err != nil || !info.Mode().IsRegular() {
return fmt.Errorf("kubelet asset missing/unreadable in %s", cacheDir)
} Prevention
- Keep the nodeup asset cache directory readable (0755 dirs, 0644 files).
- Verify mirror downloads (checksums) before bootstrapping nodes.
- Clear and repopulate a corrupt asset cache.
When it happens
Trigger: b.Assets.Find("kubelet", "") returns a non-nil error — e.g. filesystem error scanning the cache/mirror directory, or the HTTP mirror fetch for the kubelet asset fails.
Common situations: Unreadable nodeup asset cache directory, broken download of the kubelet binary from KOPS_BASE_URL/mirror, permission problems on the assets path.
Related errors
- unable to locate asset %q
- unable to find any containerd binaries in assets
- error finding runc asset
- unable to locate asset %q
- error building kubelet server cert: %v
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/aefb52f7a976140c.
Report an issue: GitHub.