Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker volume vs Kubernetes persistent volume for databases

Both Docker images & Kubernetes clusters have mechanisms to configure persistent storage on the host machine, a separate container, or just some form of cloud/network storage mechanism.

I'm trying to understand how they are different in use cases and why you'd use one over the other. For context, I'm also looking at this more with transactional database persistence in mind, rather than log files or for a shared file/folder access.

Thanks in advance!

like image 423
Jty.tan Avatar asked Aug 28 '17 23:08

Jty.tan


1 Answers

using docker volumes on a cluster like Kubernetes gives you no data persistency. The workload can get scheduled on different node and you're done. To provide persistent storage in K8S cluster you need to use K8S solution to the problem.

like image 125
Radek 'Goblin' Pieczonka Avatar answered Oct 30 '22 19:10

Radek 'Goblin' Pieczonka