ENV variables in Kubernetes (Config Maps)

Lets discuss how to set an environment variables in Kubernetes.

In a POD definition file, we can use ENV property. ENV is an array. So every item under ENV property start with a dash (-) indicating an item in the array. Each item has name and value property. The name is the name of the environment variable and the value is its value as name suggests.

- name: VARIABLE1
value: TEST

This is direct way of specifying the environment variables using the plain key-value pair.