Hello.
In this lecture we will see how to set an environment variable in Kubernetes
given a pod definition file, which uses the same image
as the Docker command we ran in the last lecture.
To set an environment variable, use the ENV property.
ENV is an array,
so every item under the ENV property starts with a dash
indicating an item in the array.
Each item has a name and a value property.
The name is the name of the environment variable
made available with the container and the value is its value.
What we just saw was a direct way of specifying the environment variables
using a plain key value pair format.
However, there are other ways of setting the environment variables
such as using ConfigMaps and secrets.
The difference in this case
is that instead of specifying value, we say value from
and then a specification of ConfigMap or secret.
We will discuss about ConfigMaps and secret keys
in the upcoming lectures.
That's it for this lecture.
I will see you in the next.