- Create a secret in your cluster, but make sure to put it in the openfaas-fn namespace.
- Reference the secret name in your function's yaml (like below).
- Deploy your function.
- If the referenced secret doesn't exist, OpenFaaS will fail the deploy and throw a 400.