Kubernetes 101 : Persistent storage - Volumes -
When a pod is stopped or when it crashes, all the data related to it is lost.
Kubernetes volumes:
For the data to persist beyond the lifecycle of a pod, we write it to a volume - directory on the host mounted inside the pod -.
We can configure the pod to use a directory on the host as its own storage.
Below the Yaml configuration file of a pod with its attached volume:
To have access to the directory on the node, the directory is mounted on a mountpoint - directory - inside the container.
We can create our pod using the below command:
Different types of storage:
We have different type of storage types like NFS, cephfs, ...
Below we use AWS for our storage:
Comments