by raarts · 9y ago · 0 comments
- Host mounts? So what happens when a container gets rescheduled to another node?
- Docker volumes? What happens when a container gets rescheduled to another node?
- External SAN? Congratulations on your budget. That's not easily doable in public cloud I guess?
- Shared filesystem like NFS, or Ceph? How's the performance for you? And the filesystem itself runs outside of your docker cloud I guess?
- In the containers themselves? So you probably run some clustered database. So what if disaster strikes and all your containers go down? And get moved around?
Also, databases in many cases need to be tuned for performance. How do you do that in a cloud?
Maybe most of you are not running container scheduling. Which really is only taking containers half way.
>- Host mounts? So what happens when a container gets rescheduled to another node?
Persistent Volumes and Claims. Kube manages moving containers, and the associated storage.
> - External SAN? Congratulations on your budget. That's not easily doable in public cloud I guess?
Specify a storage class on the persistent volume claim. Most providers (Google, AWS, Azure,..) support SSD
> So what if disaster strikes and all your containers go down? And get moved around?
You let Kube handle rescheduling containers onto new nodes.
Then it's exactly like a traditional setup except better because if the process crashes or config gets corrupted it can be replaced automatically in a few seconds, good as new.
There's nothing brave about that.
Great thing about this setup is that we can now run the entire production system locally on our laptops and test servers with or without swarm. Everything is deployed in the same way and everyone uses the same versions and configurations (even for our database).
Kubernetes supports a whole range of volume types that all travel with the container, fully managed. You can even ask it to carve out pieces from a larger volume, so you don't have to create one volume per container.
You can pin containers to individual hosts and use host volumes, but of course that rather defeats the purpose of using containers in the first place.
I can use host mounts too, but I prefer to just back up and manage all of docker, out of band, without thinking too much about it.
EDIT: granted this is for relatively small databases though. I think it could be scaled up however.
I'm very interested in approaching this problem on bare metal, though.
I.e., you can force scheduler to schedule running on fixed set of machines.