I’m learning about how to deal with storage for your containers. There are a few options:
- emptyDir – is scoped to the Pod and lifespan of the Pod. It seems to take local storage from the host and presents it to the pod. For example, if you had two containers running in a pod, they would be able to access the emptyDir. If the container is restarted, the data is still there. However, if the Pod is restarted it goes back to an empty directory
- hostDir – takes storage from the host machines (worker nodes) and presents it to the container. The data persists in the directory regardless of Pod or container lifespan.
- remote disks – lets you mount network storage like iSCSI, NFS and from cloud vendors like Microsoft, AWS and Google. The data persists in the directory regardless of Pod or container lifespan.
I’m still learning more about storage, so I will update this as I learn more.