If you start this Deployment, the following will happen: It is important to note that we do  not  have to change these Deployment resource descriptors when going from the development to the production environment. Only the ConfigMap with the template parameters is different. With this technique, it is easy to create a DRY 1  configuration without copying and maintaining duplicated large configuration files. For example, when the WildFly con‐ figuration changes for all environments, only a single template file in the init con‐ tainer needs to be updated. This approach has, of course, significant advantages on maintenance as there is no danger of configuration drift. When working with Pods and volumes as in this pattern, it is not obvious how to debug if things don’t work as expected. So if you want to examine the processed templates, check out the direc‐ tory  /var/lib/kubelet/pods/{podid}/volumes/kubernetes.io~empty-dir/ on the node as it contains the content of an  emptyDir  volume. Just kubectl exec  into the Pod when it is running, and examine this directory for any created files. The  Configuration Template  pattern builds on top of  Configuration Resource  and is especially suited when we need to operate applications in different environments with similar complex configurations. However, the setup with  Configuration Template  is more complicated and has more moving parts that can go wrong. Use it only if your application requires huge configuration data. Such applications often require a con‐ siderable amount of configuration data from which only a small fraction is dependent on the environment. Even when copying over the whole configuration directly into the environment-specific ConfigMap works initially, it puts a burden on the mainte‐ 170  |  Chapter 21: Configuration Template 1 DRY is an acronym for “Don’t Repeat Yourself.” Volume debugging tip Discussion • An init container is created and its command is executed. This container takes the  config.yml  from the ConfigMap volume, fills in the templates from the  /in directory in an init container, and stores the processed files in the  /out  directory. The  /out  directory is where the volume  wildfly-config  is mounted. • After the init container is done, a WildFly server starts with an option so that it looks up the complete configuration from the  /config  directory. Again,  /config is the shared volume  wildfly-config  containing the processed template files.