{"record":{"id":"585fa3efb344349e","repo":"GoogleContainerTools/skaffold","slug":"unable-to-load-image-q-into-cluster-w-s","errorCode":null,"errorMessage":"unable to load image %q into cluster: %w, %s","messagePattern":"unable to load image %q into cluster: %w, (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/kubernetes/loader/load.go","lineNumber":160,"sourceCode":"\t\tif knownImages == nil {\n\t\t\tvar err error\n\t\t\tif knownImages, err = findKnownImages(ctx, i.cli); err != nil {\n\t\t\t\treturn fmt.Errorf(\"unable to retrieve node's images: %w\", err)\n\t\t\t}\n\t\t}\n\t\tnormalizedImageRef, err := reference.ParseNormalizedNamed(artifact.Tag)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif stringslice.Contains(knownImages, normalizedImageRef.String()) {\n\t\t\toutput.Green.Fprintln(out, \"Found\")\n\t\t\tcontinue\n\t\t}\n\n\t\tcmd := createCmd(artifact.Tag)\n\t\tif cmdOut, err := util.RunCmdOut(ctx, cmd); err != nil {\n\t\t\toutput.Red.Fprintln(out, \"Failed\")\n\t\t\treturn fmt.Errorf(\"unable to load image %q into cluster: %w, %s\", artifact.Tag, err, cmdOut)\n\t\t}\n\n\t\toutput.Green.Fprintln(out, \"Loaded\")\n\t}\n\n\toutput.Default.Fprintln(out, \"Images loaded in\", timeutil.Humanize(time.Since(start)))\n\treturn nil\n}\n\nfunc findKnownImages(ctx context.Context, cli *kubectl.CLI) ([]string, error) {\n\tnodeGetOut, err := cli.RunOut(ctx, \"get\", \"nodes\", `-ojsonpath={@.items[*].status.images[*].names[*]}`)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to inspect the nodes: %w\", err)\n\t}\n\n\tknownImages := strings.Split(string(nodeGetOut), \" \")\n\treturn knownImages, nil\n}","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/kubernetes/loader/load.go#L142-L178","documentation":"loadImages runs the kind/k3d load command (built by createCmd, e.g. `kind load docker-image`) for each artifact tag via util.RunCmdOut. This error is returned when that command exits non-zero, including the image tag, wrapped error, and the command's stdout output. It means the image could not be pushed into the cluster nodes.","triggerScenarios":"Skaffold deploying to kind/k3d where the load command for a specific artifact.Tag fails — image not present in the local Docker daemon, node name mismatch, or the CLI rejecting the tag (invalid reference).","commonSituations":"Built with podman/nerdctl while the load command assumes docker images; image was pruned between build and deploy; kind/k3d cluster recreated so node names changed; tag containing a registry hostname that the CLI mishandles; disk full on the node.","solutions":["Read the cmdOut in the error message — it contains the raw CLI failure","Confirm the image exists in the local daemon: `docker images <tag>`; rebuild with skaffold build if pruned","Run the load manually (e.g. `kind load docker-image <tag> --name <cluster>`) to isolate the issue","If using a non-Docker runtime, ensure the image is pushed/pulled via a registry instead of relying on load","Check node disk space (`kubectl get nodes`, describe nodes) if the CLI reports containerd write failures"],"exampleFix":"// before: image pruned before deploy\n$ skaffold run  # -> unable to load image \"img:tag\" into cluster\n// after: ensure build + load in one pipeline\n$ skaffold dev  # builds then loads, or pre-load: kind load docker-image img:tag --name kind","handlingStrategy":"try-catch","validationCode":"// Ensure the image exists in the local daemon before load\nif _, _, err := docker.ImageInspect(ctx, tag); err != nil {\n    return fmt.Errorf(\"image %q not present locally, build first: %w\", tag, err)\n}","typeGuard":null,"tryCatchPattern":"err := loader.LoadImages(ctx, out, artifacts)\nfor _, a := range artifacts {\n    if err != nil && strings.Contains(err.Error(), fmt.Sprintf(\"unable to load image %q\", a.Tag)) {\n        log.Warnf(\"load failed for %s; falling back to registry push\", a.Tag)\n        if perr := pushToRegistry(ctx, a); perr == nil { continue }\n    }\n    return err\n}","preventionTips":["Always build immediately before deploy so images are not pruned in between","Check node disk pressure before large image loads","Use the same container runtime (docker) that the load command assumes"],"tags":["kubernetes","kind","k3d","image-loading","docker"],"backgroundTag":"image-load-command-failed","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}