Example 20-8. Applying OpenShift template to create new application Detailed instructions for running this example, as well as the full Deployment descriptors, can be found as usual in our example Git repository. Using data containers for the  Immutable Configuration  pattern is admittedly a bit involved. However, this pattern has some unique advantages: Discussion • Environment-specific configuration is sealed within a container. Therefore, it can be versioned like any other container image. • Configuration created this way can be distributed over a container registry. The configuration can be examined even without accessing the cluster. • The configuration is immutable as the container image holding the configura‐ tion: a change in the configuration requires a version update and a new container image. • Configuration data images are useful when the configuration data is too complex to put into environment variables or ConfigMaps, since it can hold arbitrarily large configuration data. • It has higher complexity, because extra container images need to be built and dis‐ tributed via registries. • It does not address any of the security concerns around sensitive configuration data. • Extra init container processing is required in the Kubernetes case, and hence we need to manage different Deployment objects for different environments. As expected, this pattern also has certain drawbacks: All in all, we should carefully evaluate whether such an involved approach is really required. If immutability is not required, maybe a simple ConfigMap as described in Chapter 19,  Configuration Resource  is entirely sufficient. Another approach for dealing with large configuration files that differ only slightly from environment to environment is described with the  Configuration Template  pat‐ tern, the topic of the next chapter. Discussion  |  163 oc new-app demo -p CONFIG_IMAGE=k8spatterns/config-prod:1