Configure Environment Variables In Applications
- Take me to Video Tutorial
ENV variables in Docker
$ docker run -e APP_COLOR=pink simple-webapp-color
ENV variables in kubernetes
-
To set an environment variable set an
envproperty in pod definition file.apiVersion: v1 kind: Pod metadata: name: simple-webapp-color spec: containers: - name: simple-webapp-color image: simple-webapp-color ports: - containerPort: 8080 env: - name: APP_COLOR value: pink -
There are other ways of setting the environment variables such as
ConfigMapsandSecrets