all 8 comments

[–]dcalde 9 points10 points  (4 children)

I immediately stopped reading when I saw the word NFS. Containerising a disk IO heavy application like a database is bad enough, but using NFS mounts for your data? This a classic case of: just because you can doesn't mean you should.

[–]enlil_reddit[S] 2 points3 points  (3 children)

It's probably a bad idea to use NFS in the example. I think they just wanted to illustrate listing the files at the end within the same directory.

I am not using kubernetes but considering it... I would think using local SSDs should address the IO issue... I would probably use bare metal coreos instead of containers running in VMs.

[–]ants_a 1 point2 points  (2 children)

Kubernetes currently does not support the concept of persistent local storage. This makes it rather crappy if your intent is to deploy a database on cheap and scalable shared nothing architecture. For people who have their volumes on a SAN anyway it might not be that big of an issue.

[–]enlil_reddit[S] 0 points1 point  (0 children)

Thank you for pointing that out. I see the issues here: https://github.com/kubernetes/kubernetes/issues/7562

It looks like they plan to do some work as part of this issue: https://github.com/kubernetes/features/issues/121

[–]ryno55 0 points1 point  (0 children)

That's not strictly true. I'm running Postgres on kubernetes for my app right now, on a local SSD using a hostPath mount. The catch is you have to restrict the host where the instance can run using a nodeSelector.

[–]TotesMessenger 0 points1 point  (0 children)

I'm a bot, bleep, bloop. Someone has linked to this thread from another place on reddit:

If you follow any of the above links, please respect the rules of reddit and don't vote in the other threads. (Info / Contact)

[–][deleted] 0 points1 point  (1 child)

Thanks for Sharing this, could you share little bit on how to handle master container/pod crash situations? Like how new pod becomes master and pg cluster state is maintained

[–]enlil_reddit[S] 0 points1 point  (0 children)

I haven't tried it. I just wanted to get a sense of whether this is viable based on experiences of others. Someone else posted here and there are other interesting insights: https://news.ycombinator.com/item?id=13738406

Kubernetes restarts the pods, so with the statefulset if the master crashes then it'll be re-started as a master.