4 Configuring applications with ConfigMaps and Secrets
One of the great advantages of running apps in containers is that you eliminate the gaps between environments. The deployment process is to promote the same container image through all your test environments up to production - so each deployment uses the exact same set of binaries as the previous environment. You'll never again see a production deployment fail because the servers are missing a dependency which someone manually installed on the test servers and forgot to document. Of course there are differences between environments, and you provide for that by injecting configuration settings into containers.
Kubernetes supports configuration injection with two resource types: ConfigMaps and Secrets. Both types can store data in any reasonable format, and that data lives in the cluster independent of any other resources. Pods can be defined with access to the data in ConfigMaps and Secrets, with different options for how that data gets surfaced. In this chapter you'll learn all the ways to manage configuration in Kubernetes, which are flexible enough to meet the requirements for pretty much any application.