concept
Patches and generators
The patches field targets resources for strategic merge or JSON patch. Generators produce named ConfigMaps or Secrets and may append a content suffix; review recognized references and sensitive output.
Formal Syntax & Structure
kubernetes syntaxkubernetes
patches:- path: PATCH_FILE target: kind: Deployment name: catalogWorking Example
Example Snippetkubernetes
apiVersion: kustomize.config.k8s.io/v1beta1kind: Kustomizationresources:- ../../basenamespace: staging-studynamePrefix: stg-patches:- path: replicas.json target: group: apps version: v1 kind: Deployment name: catalogimages:- name: registry.example.invalid/catalog newTag: v2configMapGenerator:- name: catalog-settings behavior: merge literals: - MODE=staging - PAGE_SIZE=20