- Security
Inject environment variables
This tutorial shows how to inject environment variables into Function.
You can specify environment variables in the Function definition, or define references to the Kubernetes Secrets or ConfigMaps.
Prerequisites
Before you start, make sure you have these tools installed:
- Kyma installed on a cluster
Steps
Follow these steps:
- Create your ConfigMap
Click to copy
kubectl create configmap my-config --from-literal config-env="I come from config map"
- Create your Secret
Click to copy
kubectl create secret generic my-secret --from-literal secret-env="I come from secret"
- Kyma CLI
- kubectl