Kubernetes pods are invariably associated with data, and the data can either be made integral to a Docker container via its Docker image or decoupled from the Docker container.
Problem
If data (in on-disk files) is made integral to a Docker container , the following issues could result:
The data is not persistent. The data is removed when a Docker container is restarted, which could also be due to a container crash.
The data is container-specific and cannot be shared with other containers as such.
Solution
One of the principles of modular design is the Single Responsibility Principle ...