kaka
kaka

Reputation: 7915

kubernetes pod ephemeral storage increase online

I am looking for a solution where I would able to increase the ephemeral storage size limit for a pod at runtime.

The pod is using node's local storage and has a limit of 5 Gb, which is configured in the pod'd deployment yaml volumes.<volumeName>.emptyDir.sizeLimit. I have to increase the storage size. This is possible by modifying the deployment, but that restarts the pod. Is there a way where we can increase it without pod restart.

There is option of online volume size increase for persisted vloume, by executing patch command on persistedVolumeClaim. But not sure if similar feature is available for ephemeral storage also ? The kubernetes service is in AKS. The expansion size will vary for every other pod. As soon as a pod reaches the storage limit, I would need to increase the storage limit by some specific amount.

Upvotes: 0

Views: 379

Answers (1)

Lucas Barbosa
Lucas Barbosa

Reputation: 11

Making this change without a restart is not possible. Instead, see if it is viable to do a Green-Blue Deployment that consists of:

  1. Create a new deployment equal to the current one, but increasing the storage to the desired size in this new deployment.
  2. This one deployment will have a label to say what the deploy version is.
  3. Run the necessary tests on this one.
  4. Edit the service selector to point only to this one.

Upvotes: 0

Related Questions