envsubst
1/2export PASSWORD="$(pass myapp/password)"
envsubst < manifest.yaml | kubectl apply -f -
envsubst
is not a real templating engine
envsubst
2/2All variables are replaced (${foo}
and $foo
)
Preserving some variables is ugly:
export PASSWORD="$(pass myapp/password)"
envsubst '$PASSWORD' < manifest.yaml | kubectl apply -f -
Friends don’t let friends use
envsubst
for templating— Unknown