Inflate Helm charts in kustomize build

Render helmCharts: block to manifests; note: needs helm in PATH

kustomize build --enable-helm ./overlay

tool
kustomize23 commands
tags
kustomizegitopsk8s

More kustomize commands

  • cat <<'EOF' >> kustomization.yaml components: - ../../components/monitoring EOF

    Mixin reusable patches/resources via components: (Kustomize v4+)

  • cat <<'EOF' >> kustomization.yaml replacements: - source: {kind: ConfigMap, name: cfg, fieldPath: data.host} targets: - select: {kind: Deployment} fieldPaths: [spec.template.spec.containers.0.env.0.value] EOF

    modern: replacements: copies a field cross-resource, replaces deprecated vars:

  • cat <<'EOF' >> kustomization.yaml patches: - target: {kind: Deployment, labelSelector: app=api} patch: |- - op: replace path: /spec/replicas value: 3 EOF

    JSON6902 patch applied to all matching targets, no separate file

  • kustomize edit set image app=registry.example.com/app@sha256:<id>

    Pin by immutable digest; newName+digest also settable in images: block

  • cat <<'EOF' >> kustomization.yaml secretGenerator: - name: db-creds literals: [PASSWORD=s3cr3t] generatorOptions: disableNameSuffixHash: true EOF

    note: disableNameSuffixHash keeps stable name but breaks rollout-on-change

all 23 kustomize commands