Skip to content

Troubleshooting

Symptom first, cause second. The first two entries are the lab's own failures, kept verbatim in transcripts t08 and t09; the rest are the same small set of causes in other clothes.

The build refuses a patch

Error: no resource matches strategic merge patch "Deployment.v1.apps/webhelo.[noNs]": no matches for Id ...; failed to find unique target for patch ...

  1. The name is wrong — most likely a typo. The lab's broken-patch overlay patches a Deployment named webhelo (one l short), and the error quotes the name it could not find: webhelo.[noNs]. Read the quoted identifier first; it is the tool telling you exactly what it looked for.
  2. The kind or apiVersion is off. A patch written for apps/v1 Deployment does not match anything else, and the error names the full identity it sought, group and version included.
  3. The resource is not in this build. A patch in an overlay can only reach resources the build actually gathers — check that the base (or the overlay's resources:) really includes the target. A patch cannot create its target; silence is not on offer, which chapter 7 argues is the kind behaviour.

The build cannot find a file

Error: accumulating resources: accumulation err='accumulating resources from 'ghost.yaml': evalsymlink failure on '.../ghost.yaml' : lstat ...: no such file or directory' ...

  1. The listed file is not there. The lab's broken-resource overlay lists ghost.yaml, which does not exist. The message is wrapped three deep — read it from the inside out: the innermost words are the operating system's plain no such file or directory, and the path printed is the absolute one kustomize resolved. Check the name, then the spelling, then the folder you are standing in.
  2. A relative path resolved somewhere unexpected. Paths in a kustomization are relative to that file's folder, not to your shell's directory. An overlay reaching its base writes ../../base counted from the overlay folder — count the ..s from the kustomization, not from where you ran the command.

The output is missing a change you made

You edited the overlay; the build prints the old world.

  1. You built a different folder. The build's argument is the whole identity of the run. kustomize build app/base will never show overlay changes, and it will succeed beautifully while doing so. When output looks stale, echo the path you built before you doubt the tool.
  2. The change went into the wrong layer. An images: entry in staging does nothing for production. Overlays do not inherit sideways — only downward from the layers they name.
  3. A generator entry was shadowed. An overlay generator with the base's name but no behavior: defaults to create, and duplicate names are an error or an override depending on the kind — when a generated value will not change, check chapter 6's three behaviours before checking the value.

The hash did not change (or changed "by itself")

  1. Contents really are identical. The hash covers the generated resource's contents — not the overlay's name, not its labels from transformers. A prefix change renames without rehashing (chapter 6's table: staging's hashes equal the base's). If you merged a literal and the hash held still, the merge did not land — see the entry above.
  2. It changed because content did — that is the feature. A new hash means a new name, new references, and a rollout. If your tooling breaks on unpredictable names, the answer is to consume the built output rather than guess names, not to disable the hash without reading chapter 6's trade-off.

The warning about commonLabels

Every build prints 'commonLabels' is deprecated.

Nothing is broken. The field still works; current kustomize prefers labels:. Either adopt the new field (mind the includeSelectors decision, chapter 5), or run kustomize edit fix on the folder (chapter 9 shows its output and the converted file) — and read the resulting diff either way, because the converter also renames the older patch fields.