{"record":{"id":"4cdc62e411a56c95","repo":"GoogleContainerTools/skaffold","slug":"rendering-manifests-w-4cdc62","errorCode":null,"errorMessage":"rendering manifests: %w","messagePattern":"rendering manifests: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/skaffold/app/cmd/render.go","lineNumber":80,"sourceCode":"\t\tvar bRes []graph.Artifact\n\t\tvar err error\n\n\t\tif fromBuildOutputFile.String() != \"\" || len(preBuiltImages.GetSlice()) > 0 {\n\t\t\t// pass `nil` as render shouldn't build if provided --build-artifacts or --images\n\t\t\tbRes, err = getBuildArtifactsAndSetTags(nil, r.ApplyDefaultRepo)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"loading artifacts: %w\", err)\n\t\t\t}\n\t\t} else {\n\t\t\tbRes, err = r.Build(ctx, buildOut, targetArtifacts(opts, configs))\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"executing build: %w\", err)\n\t\t\t}\n\t\t}\n\n\t\tmanifests, err := r.Render(ctx, out, bRes, offline)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"rendering manifests: %w\", err)\n\t\t}\n\t\treturn manifest.Write(manifests.String(), opts.RenderOutput, out)\n\t})\n}\n","sourceCodeStart":62,"sourceCodeEnd":85,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/cmd/skaffold/app/cmd/render.go#L62-L85","documentation":"In `skaffold render`, after obtaining build results, render templates the manifests via `r.Render`. This wrapper reports failures in that templating step. It means skaffold could not produce the final Kubernetes manifests — usually an invalid manifest template, unresolved image references, or an error writing/rendering for the given renderer (kubectl/kustomize/helm).","triggerScenarios":"`skaffold render --output <file>` / default render where r.Render fails: manifest files listed in the deploy section are missing or invalid YAML, kustomize overlays broken, helm chart values invalid, or templated image placeholders don't match built artifacts.","commonSituations":"Renamed/deleted manifest paths in skaffold.yaml; kustomization.yaml referencing missing resources; helm charts with bad values; running `skaffold render --offline` while required remote resources are absent; placeholders like {{.IMAGE_NAME_x}} left unresolvable.","solutions":["Run `kubectl apply --dry-run=client -f <manifest>` or `kustomize build` on the manifests to find YAML/kustomize errors.","Verify all manifest paths in the deploy section of skaffold.yaml exist and are valid YAML.","If using --offline, ensure the manifests have no remote dependencies, or drop --offline.","Run with -vdebug to see which manifest/renderer step failed and fix that template."],"exampleFix":"# before: deploy.manifests points at a missing file\ndeploy:\n  kubectl:\n    manifests:\n      - manifests/deploy.yaml  # deleted\n# after: correct path\ndeploy:\n  kubectl:\n    manifests:\n      - k8s/deployment.yaml\n","handlingStrategy":"validation","validationCode":"// Validate manifests referenced by skaffold.yaml before rendering\nconst cfg = require('js-yaml').load(require('fs').readFileSync('skaffold.yaml', 'utf8'));\nconst manifests = cfg.deploy?.kubectl?.manifests ?? cfg.manifests ?? [];\nconst fs = require('fs');\nfor (const raw of manifests) {\n  const p = typeof raw === 'string' ? raw : Object.values(raw)[0];\n  if (!fs.existsSync(p)) throw new Error(`manifest not found: ${p}`);\n}\nexecSync('kustomize build overlays/prod > /dev/null', {stdio: 'pipe'}); // catches kustomize errors early","typeGuard":null,"tryCatchPattern":"try {\n  execFileSync('skaffold', ['render', '--output', 'rendered.yaml']);\n} catch (e) {\n  const msg = e.stderr?.toString() ?? '';\n  if (msg.includes('rendering manifests')) {\n    console.error('Manifest templating failed; validate YAML/kustomize/helm inputs.');\n    console.error(e.stdout?.toString() ?? '');\n  } else throw e;\n}","preventionTips":["Keep all manifest paths in skaffold.yaml relative to the working directory skaffold runs from.","Lint manifests (kubeval/kubeconform, kustomize build) in CI before render.","Avoid --offline unless manifests have no remote dependencies.","Use -vdebug to identify exactly which manifest/template fails when render errors."],"tags":["skaffold","render","kubernetes","manifests"],"backgroundTag":"manifest-render-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"}