Inflate Helm charts in kustomize build kustomize
Render helmCharts: block to manifests; note: needs helm in PATH
kustomize build --enable-helm ./overlay
more kustomize
all 23 commands →
Apply a reusable component overlay
cat <<'EOF' >> kustomization.yaml
components:
- ../../components/monitoring
EOF
Copy a field with replacements
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
Inline patch with target selector
cat <<'EOF' >> kustomization.yaml
patches:
- target: {kind: Deployment, labelSelector: app=api}
patch: |-
- op: replace
path: /spec/replicas
value: 3
EOF
Pin image by digest and rename
kustomize edit set image app=registry.example.com/app@sha256:<id>
Secret generator without hash suffix
cat <<'EOF' >> kustomization.yaml
secretGenerator:
- name: db-creds
literals: [PASSWORD=s3cr3t]
generatorOptions:
disableNameSuffixHash: true
EOF