In some applications, the application configurations are set by default in the codebase (hard-coded). If you want to override them, you can provide your override values through environment variables. Sometimes and for some configurations, it doesn’t matter if the override values exist. However, you want to make sure the application runs without any issues. If ConfigMaps/Secrets are available, use them and override default values, and if there are no ConfigMaps/Secrets for the application, run the application with its default configuration. In such a case, Kubernetes provides us optional field for using ConfigMaps/Secrets as environment variables in Pods.