Increase the base device size of docker container with Kubernetes

5/21/2018

I have a Kubernetes cluster setup with 3 worker nodes and a master node. Using docker images to generate pods and altering the working containers. I have been working on one image and have altered it heavily to make the servers within work. The problem I am facing is -

There is no space on the device left.

On further investigation, I found the docker container is set at a 10G size limit which now, I would definitely want to change. How can I change that without losing all my changes in the container and without the need of storing the changes as a separate image altogether?

-- Raj Dosi
docker
kubernetes
linux

1 Answer

5/21/2018

Changing the limit without a restart is impossible.

To prevent data loss during the container restart, you can use Volumes and store data there, instead of the root image.

P.S. It is not possible to mount Volume dynamically to a container without restart.

-- Anton Kostenko
Source: StackOverflow