3 ms·
Biggest issue, is not really k8s but docker, its drivers for storage are still quite young. I personally wouldn't place a database in container for that reason
by takeda 10y ago
Biggest issue, is not really k8s but docker, its drivers for storage are still quite young.
I personally wouldn't place a database in container for that reason. Essentially when you do so any durability guarantees that a database provides are going out of the window.
Things might seem to work fine, but when container get abruptly terminated in a wrong moment you might learn that all data is gone.
- hintbits 10y agoWhy would the data disappear, given that it's stored on an external volume (i.e. EBS or Google Cloud Storage or just a directory on your laptop), not in the container FS?
- takeda 10y agoI simplified, because in the end that would be the equivalent. The danger is that some bugs in a filesystem, manifests themselves only when there is abrupt termination, otherwise things appear normal. Stuff like data is being written in incorrect order, or data is synced to disk at wrong time, or not at all. On top of that user also expects performance, so some shortcuts can be taken that compromises the above (especially if the criteria is that docker is intended for stateless applications). When there bugs like that and things are abruptly terminated, the data on the disk can be heavily mangled to a point that can't be recovered so essentially it would be lost.
- smarterclayton 10y agoKubernetes does not use Docker's storage drivers. There have been bugs with attach/detach of cloud block storage though that has impacted applications a few times over Kubernetes lifecycle, although all have been fixed fairly quickly.