Uncategorized

Volume in kubernetes

From what I understand:

Mounting volume into container can help you to:

1. Read configuration files from the volume. It could be from ConfigMap, some persistent volume, etc.
2. Sharing files between container in pod.
3. Write into the volume. If the volume is persistent and set to be writable, the data will remain even when the pod is terminated.

However, keep in mind that the data in volume that doesn’t use PermanentVolume will lost when the pod is terminated. So it’s like an “ephemeral volume”