{"record":{"id":"29271417b2d33af3","repo":"GoogleContainerTools/skaffold","slug":"loading-images-into-kind-nodes-w","errorCode":null,"errorMessage":"loading images into kind nodes: %w","messagePattern":"loading images into kind nodes: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/kubernetes/loader/load.go","lineNumber":101,"sourceCode":"}\n\n// LoadImages loads images into a local cluster.\n// imagesToLoad is used to determine the set of images we should load, based on images that are\n// marked as local by the Runner, and part of the calling Deployer's set of manifests\nfunc (i *ImageLoader) LoadImages(ctx context.Context, out io.Writer, localImages, deployerImages, images []graph.Artifact) error {\n\tcurrentContext, err := i.getCurrentContext()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tartifacts := imagesToLoad(localImages, deployerImages, images)\n\n\tif config.IsKindCluster(i.kubeContext) {\n\t\tkindCluster := config.KindClusterName(currentContext.Cluster)\n\n\t\t// With `kind`, docker images have to be loaded with the `kind` CLI.\n\t\tif err := i.loadImagesInKindNodes(ctx, out, kindCluster, artifacts); err != nil {\n\t\t\treturn fmt.Errorf(\"loading images into kind nodes: %w\", err)\n\t\t}\n\t}\n\n\tif config.IsK3dCluster(i.kubeContext) {\n\t\tk3dCluster := config.K3dClusterName(currentContext.Cluster)\n\n\t\t// With `k3d`, docker images have to be loaded with the `k3d` CLI.\n\t\tif err := i.loadImagesInK3dNodes(ctx, out, k3dCluster, artifacts); err != nil {\n\t\t\treturn fmt.Errorf(\"loading images into k3d nodes: %w\", err)\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// loadImagesInKindNodes loads artifact images into every node of a kind cluster.\nfunc (i *ImageLoader) loadImagesInKindNodes(ctx context.Context, out io.Writer, kindCluster string, artifacts []graph.Artifact) error {\n\toutput.Default.Fprintln(out, \"Loading images into kind cluster nodes...\")","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/kubernetes/loader/load.go#L83-L119","documentation":"LoadImages detects a kind cluster from the kubeContext and delegates image loading to the kind CLI via loadImagesInKindNodes. This error wraps any failure from that path — the kind CLI is missing, fails, or rejects the load command. It occurs because kind (unlike a registry-backed cluster) needs images injected into its nodes explicitly.","triggerScenarios":"Running skaffold dev/run/deploy/verify against a kubeContext whose cluster is detected as kind (config.IsKindCluster), and loadImagesInKindNodes fails: kind binary absent, wrong cluster name, or kind load docker-image command exits non-zero.","commonSituations":"kind binary not on PATH; multiple kind clusters and current context points to one that is not running; Docker daemon not reachable so the image isn't present for `kind load docker-image`; kubectl context renamed so KindClusterName resolves to a wrong cluster.","solutions":["Install/verify the kind CLI: `kind version`; ensure it is on PATH","Confirm the kind cluster is running: `kind get clusters` and that the current kubectl context matches it","Verify the image was built locally and the Docker daemon is up (`docker images <tag>`)","Run `kind load docker-image <tag> --name <cluster>` manually to see the raw failure","Ensure config.KindClusterName(currentContext.Cluster) maps to the right cluster name; fix kubeconfig context naming if not"],"exampleFix":"// before: context points to a stale kind cluster\ncurrent-context: kind-kind-stale\n// after: point kubeContext at the running kind cluster\nkubectl config use-context kind-kind\n# then re-run skaffold","handlingStrategy":"validation","validationCode":"// Before running skaffold against kind\nif _, err := exec.LookPath(\"kind\"); err != nil {\n    return fmt.Errorf(\"kind CLI not found on PATH: %w\", err)\n}\nout, err := exec.Command(\"kind\", \"get\", \"clusters\").Output()\nif err != nil || !strings.Contains(string(out), clusterName) {\n    return fmt.Errorf(\"kind cluster %q is not running\", clusterName)\n}","typeGuard":null,"tryCatchPattern":"err := loader.LoadImages(ctx, out, artifacts)\nif err != nil {\n    if strings.Contains(err.Error(), \"loading images into kind nodes\") {\n        // fall back to pushing via registry instead of kind load\n        return pushToRegistry(ctx, artifacts)\n    }\n    return err\n}","preventionTips":["Install kind CLI and pin its version alongside the cluster version","Ensure Docker daemon is running before skaffold dev","Match the kubectl context name to the kind cluster name"],"tags":["kubernetes","kind","image-loading","cli"],"backgroundTag":"kind-image-load-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"}