Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Kustomize Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-kustomize-knowledge-patch-nevaberry-plugins)
---
name: kustomize-knowledge-patch
description: Kustomize
version: "5.8.3"
license: MIT
metadata:
author: Nevaberry
---
# Kustomize Knowledge Patch
Load this skill for Kustomize namespace inheritance, Helm chart rendering,
replacements, image overrides, patch files, edit commands, and build integration.
Use the topic references for detailed guidance and release attribution.
## Reference index
| Reference | Topics |
| --- | --- |
| [Namespaces and Helm](references/namespaces-and-helm.md) | Child namespace inheritance, chart namespaces, prerelease charts, Helm v3 and v4 |
| [Patch files and edit commands](references/patches-and-editing.md) | Empty patches, strategic-merge deletes, patch options API, label editing, configurations, components, fetched OpenAPI schemas, version reporting, kubectl integration |
| [Replacements and image transforms](references/replacements-and-images.md) | Literal values, embedded YAML or JSON, selector regular expressions, image-backed volumes |
## Upgrade and schema checks
### Namespace inheritance
Kustomize 5.8.0 can fail to propagate namespaces to child kustomizations.
If builds depend on that inheritance, wait for a patch release before upgrading.
Kustomize 5.8.1 restores namespace propagation to child kustomizations, so builds
that rely on namespace inheritance can upgrade to 5.8.1.
### Fetched OpenAPI schemas
Kustomize reports an error when it fetches an OpenAPI schema in a format other
than JSON. Serve remote schemas as JSON when referencing them through
`openapi.path`.
### Kustomize embedded in kubectl
Kustomize v5.8.3 removes dependencies and compressed blobs that interfered with
upgrading the version embedded in `kubectl`.
## Replacement targets
### Copy a literal string
Set `sourceValue` on a replacement to copy a literal string into its target
fields. This example sets the existing `data.LOG_LEVEL` field in the
`app-settings` ConfigMap:
```yaml
replacements:
- sourceValue: "info"
targets:
- select:
kind: ConfigMap
name: app-settings
fieldPaths:
- data.LOG_LEVEL
```
### Traverse embedded YAML or JSON
A replacement target field path can traverse YAML or JSON stored as a string
in a manifest. This example copies a hostname into the nested `config.hostname`
field of the JSON stored under the target ConfigMap's `config.json` data key:
```yaml
replacements:
- source:
kind: ConfigMap
name: source-configmap
fieldPath: data.HOSTNAME
targets:
- select:
kind: ConfigMap
name: target-configmap
fieldPaths:
- data.config\\.json.config.hostname
```
### Match target names with regular expressions
Replacement selectors support regular expressions. Set `name: "app-.*"` under
a replacement target's `select` to match resources whose names start with `app-`.
## Image-backed volumes
The `images` transformer updates the `image.reference` field on image-backed
volumes. This example changes a volume reference of
`registry.example.com/assets:v1` to `registry.example.com/assets:v2`:
```yaml
images:
- name: registry.example.com/assets
newTag: v2
```
## Helm chart rendering
### Use the kustomization namespace
The kustomization's top-level `namespace` passes through to `helmCharts`.
Chart entries can omit their own `namespace` when they should use the
kustomization's namespace.
### Consider prerelease chart versions
Set `version: devel` on a `helmCharts` entry to let Helm consider prerelease
chart versions when pulling the chart.
### Render with Helm v3 or v4
Kustomize can render charts declared in `helmCharts` with either Helm v3
or Helm v4.
## Patch files and options
### Keep an empty patch placeholder
A referenced patch file containing only blank lines or YAML comments is
accepted as a no-op, so it can serve as a placeholder.
### Combine strategic-merge deletes
A single strategic-merge patch file can contain multiple `$patch: delete`
documents without causing `kustomize build` to panic.
### Populate patch options programmatically
The API adds `PatchArgs` for populating patch options programmatically.
## Edit commands
### Preserve the force flag when switching label commands
`kustomize edit add labels` handles `-f` the same way as
`kustomize edit add commonLabels`, so scripts can keep the flag when
switching commands.
### Add multiple labels without selectors
`kustomize edit add labels --without-selector` can add multiple labels in a
single invocation without raising a duplicate-key error.
### Register a transformer configuration
Use `kustomize edit add configuration` to register a transformer configuration
file under `configurations` in `kustomization.yaml`:
```sh
kustomize edit add configuration transformer-config.yaml
```
### Remove a component
Use `kustomize edit remove component` with the component path listed under
`components` in `kustomization.yaml`:
```sh
kustomize edit remove component ../components/metrics
```
## Version reporting for Go builds
When the build-time version flag and Go dependency metadata provide no version,
`kustomize version` falls back to the main module version embedded in the binary
(`BuildInfo.Main.Version`).