Understanding advanced Pod application patterns
In this section, we are going to discuss some interesting patterns using simple Pods. All the patterns we are going to review are based on the special mechanisms offered by Kubernetes for sharing kernel namespaces in a Pod, which allow containers running inside to mount the same volumes and interconnect via localhost.
Init containers
More than one Pod can run inside a container. Pods allow us to isolate different application processes that we want to maintain separately in different containers. This helps us, for example, to maintain different images that can be represented by separated code repositories and build workflows.
Init containers run before the main application container (or containers, if we run more in parallel). These init containers can be used to set permissions on shared filesystems presented as volumes, create database schemas, or any other procedure that helps initialize our application. We can even use them...