4 ms·
In k8s you can easily host stateful services. You have persistent disks that you can attach to containers, and you also have StatefulSets if you have a stateful
by wereHamster 8y ago
In k8s you can easily host stateful services. You have persistent disks that you can attach to containers, and you also have StatefulSets if you have a stateful service that you want to have automatically scaled (https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/ https://kubernetes.io/docs/concepts/workloads/controllers/st...). You can use both to run a database (postgres) for example.
- zaat 8y agoI thought that this was the case too, but OP had a link (https://gravitational.com/blog/running-postgresql-on-kubernetes/ https://gravitational.com/blog/running-postgresql-on-kuberne...) to previous post that got me worried.
- outworlder 8y agoFrom TFA > Kubernetes is not aware of the deployment details of Postgres. A naive deployment could lead to complete data loss. That sounds ominous, but is actually a tautology. You have the exact same challenges anywhere else, but since K8s makes some operations so easy to do, you need to be careful. RDBMs are specially tricky because most of them expect a single "master" which holds special status. And it so happens to hold all your data too (as do your replicas, provided they are up to date).