Can we consider using containers (and kubernetes) for monolith, stateful web applications?

6/17/2018

I'm learning about Containers and Kubernetes and was evaluating if we can move our monolith, stateful appplication to kubernetes?

I was also looking at https://kubernetes.io/blog/2018/03/principles-of-container-app-design/ and "Self-Containment" looks close. We can consider using "storage".

Properties of my application: 1. Runs on a JVM 2. Does not have a database. Saves all its data/content to TAR files on the file-system 3. Should be able to backup and retain state if the container goes down.

In our current scenarios, we deploy the app to a VM and our IT teams generally take snapshots of these VM's as backups and restore them if the app fails or they have to restore to a point where the app was working good. I wanted to avoid this.

Please advice.

-- Suren Konathala
containers
kubernetes
stateful

1 Answer

6/17/2018

You call it as web application, but based on what it does it just a process which writes to file system. If you move to k8s, write to NFS or persistent storage from pod. If you can only run one instance, then you can't use k8s horizontal scaling.

-- Raj
Source: StackOverflow