How to use environment variables with Kubernetes. With and without using secrets when you are deploying pods

What are we using environment variables for and when it makes sense to use secrets for environment variables in Kubernetes? And why not commit my .env file directly into my project?

I will explain why you should use environment variables in Kubernetes and not use the .env file directly into your container image and how you can…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store