Search⌘ K

The Best Way to Configure an Application

Explore effective methods to configure applications in Kubernetes by combining baked-in configuration files with environment variables. Understand when to use ConfigMaps for cluster-specific settings and achieve simpler, more portable configurations while maintaining flexibility for different deployment scenarios.

Why should we not use ConfigMaps?

In our experience, ConfigMaps are overused.

If we have a configuration that is the same across multiple clusters, or if we have only one cluster, all we need to do is include it in our Dockerfile and forget it ever existed. When there are no variations of a configuration, there’s no need to have a configuration file, at least not outside an immutable image.

Unfortunately, that is not always the case. To be more precise, it’s almost never the case. We tend to make things more complicated than they should be. This, among other things, often means an endless ...