If you want to use Volume with Containers, please refer this url.
Volumes are often a better choice than persisting data in a container’s writable layer, because a volume does not increase the size of the containers using it, and the volume’s contents exist outside the lifecycle of a given container.
When its comes to a question of How to specify the size limit while creating the docker volume?
As we can see it’s possible to create docker volumes with a predefined size and do it from Docker API which is especially useful if you’re creating new volumes from some container with mounted docker socket and don’t have access to the host.
But Currently, Its looks like only tmpfs mounts support disk usage limitations.
It is possible to specify the size limit while creating the docker volume using size param with –opt options.
- Understanding Kubernetes’s Taints and Tolerations in easy way - July 5, 2020
- Understanding Node Selector and Node Affinity in Kubernetes - July 5, 2020
- Terrafrom – Example Code for remote-exec provisioner - July 5, 2020