OpenShift storage concepts
In the previous chapter, we hinted a the volume concept—the tool that is used by OpenShift to implement storage. Let's start by looking at it more thoroughly.
Volumes
As we mentioned in the preceding chapter, OpenShift's unit of deployment and scaling is a pod, which can contain many containers. The containers in the pod are ephemeral—they can be stopped and started at any moment by Kubernetes. The data stored in the container will be lost when the container goes down because during the restart the fresh container is recreated from the image.
As a result, we will need another tool to implement the storage. Such a tool is the volume.
So, what is a volume? From the technical point of view, volumes are basically directories on the node that runs the pod, which are mapped into the container filesystem. Also, volumes have an explicitly defined life cycle, which equals the pod life cycle. Whenever the pod is stopped, the volume is destroyed. On the other hand, when the containers...