Use Persistent Volumes

Volume Definition

You only need to define 3 things for a volume:

  • Its name, so it can be mounted into Component

  • Its size

  • Its type (more on this in a bit)

Pre-requisites

Types of volumes

Single-node attachment (Disk)

These volumes can be attached to just one node, so if you're planning to use multiple replicas for a Service, or to use the same volume in multiple Services, consider using the multi-node attachment.

In Bunnyshell, we called this type Disk.

The benefit of using single-node attachment volumes is their performance advantage over multi-node attachment volumes, which rely on the network to transfer data.

Multi-node attachment (Network)

When in need of a single storage for multiple Services (or replicas of the Same service) to write into, the Network disk type should be used in Bunnyshell.

Behind the scenes, it creates an NFS storage.

Detecting & Converting volumes

Volumes are automatically detected from your docker-compose.yaml file and the best-performance type is chosen, based on the volume's usage (mount in Services).

Please check the Volumes documentation for more information.

Discarded docker-compose (local) volumes

Folders mounted locally in docker-compose will not have any use when deployed in Kubernetes (or anywhere else other than a local environment). That is why they are discarded.

At the same time, volumes which are not used in any Component are discarded.

Last updated

Was this helpful?