I suggest you first go thru my previous article on environment variables with config maps.
ENV variables in Kubernetes
Lets discuss how to set an environment variables in Kubernetes.
Config Maps are better way to specify environment variables. However assume below scenario.
You have a web application and it will connect to MySQL database. In a basic scenario you will…