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:

Steps

Follow these steps:

  1. Create your ConfigMap
Click to copy
kubectl create configmap my-config --from-literal config-env="I come from config map"
  1. Create your Secret
Click to copy
kubectl create secret generic my-secret --from-literal secret-env="I come from secret"
  • Kyma CLI
  • kubectl