3 ms·
But Kubernetes _is_ designed to support stateful containers; that's what StatefulSets are about. There's nothing about containers that says they need to be sta
by lobster_johnson 10y ago
But Kubernetes _is_ designed to support stateful containers; that's what StatefulSets are about.
There's nothing about containers that says they need to be stateless, it's just more convenient that way because you can treat every container as expendable, redundant, fungible commodities. But the real world needs state, and Kubernetes is capable of managing it. In particular, the pattern pretty much required for stateful apps on Kubernetes is that of using an exclusive-access network block device. Since only one container (or pod) can mount it at any given time, you can ensure that the state follows the container around.
- x0x0 10y agoI understand it can be done; it just seems like a hassle (viz this thread!) and I don't understand the upside. Discovery is an upside, but I bet there's a way to get discovery with manual updates. It may just be our use case -- we have enough data (low TB) that cloning is not a fast thing to do. Thanks again!
- lobster_johnson 10y agoSure, with Kubernetes you can create a "headless" service that points statically at some external service instead of a container.