Andrey
Andrey

Reputation: 21285

Kustomize fails to process secretGenerator, with kubectl it works though

I have an overlay kustomization.yaml as following:

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

bases:
    - ../../base/

patches:
    - patch.yaml

secretGenerator:
    - name: my-secrets
      env: password.env

When applying it with embedded kustomize on kubectl like kubectl -k it works fine, but now I need to generate the final yaml before applying it so when I attempt to use itself through kustomize build devops/kustomize/my-cluster/overlay/local > local.yaml I'm getting this error:

Error: json: unknown field "env"

secretGenerator spec has env parameter so I'm not sure what am I doing wrong.

Upvotes: 3

Views: 1482

Answers (1)

Andrey
Andrey

Reputation: 21285

Turns out that newer versions of kustomize use envs parameter instead of env

Upvotes: 5

Related Questions