https://github.com/kubernetes/kubernetes/blob/master/docs/us...
https://github.com/kubernetes/kubernetes/blob/master/docs/us...
So when I specify the VOLUME (in a docker file/kubernetes-pod-spec) this is managed by the system.
And with respect to ensuring uninterupted service on the database layer then, how are ongoing changes synched? Or is that something I must design for by adding a queueing layer?
To make that concrete, I have one pod with MySQL and the associated VOLUME is configured on KUBERNETES instance.
I tell K to scale MySQL to 2 instances.
It points the second instance to the same physical files and starts up?
So VOLUMES live outside of KUBERNETES and do not spin up or down in a transient nature?
Can 2 instances of a database server use the same files without stepping on each other?
How does the VOLUME scale without becoming the new single point of failure?
Maybe that is the point where you use massive RAID striping and replication to scale storage? (That's far from a new concept and is a pretty stable tech).
If I'm on the right track here I might almost be ready to say I understand and trust persistence!
If you have a single node database, Kubernetes can make sure that only a single pod is running at any one time, attached to your volume. It will automatically recover if e.g. a node crashes.
If you have a distributed SQL database, Kubernetes can make sure the right volumes get attached to your pods. (The syntax is a little awkward right now, because you have to create N replication controllers, but PetSets will fix this in 1.3). Each pod will automatically be recovered by Kubernetes, but it is up to your distributed database to remain available as the pods crash and restart.
In short: Kubernetes does the right thing here, but Kubernetes can't magically make a single-machine database into a distributed one.
Now when you want clustering of things like mysql/mongo/elasticsearch/rabbitmq/etc it's a bit more complex, b/c they bring their own sharding/clustering concepts, which you have to implement on top of kubernetes. So you won't be able to simply scale mysql up via "kubectl scale rc --replicas=5", but you will have to implement a specific clustering solution, with five unique mysql-pods with their own volumes. For mysql there is "vitess" which is an attempt to build such an abstraction upon kubernetes.