4

What would a be good approach to fix storage issues when your services run out of the presistent volume free space?

For example I have a gitlab service running on kubernetes installed with Helm Chart. I have used the default settings, but now I ran out of free space for gitlab. What would be the ideal approach to fix this issue?

  • Is there anyway I can increase the PV in size?
  • Should I somehow backup the gitlab data, recreate it with more storage?
  • Can I somehow backup and restore data from PV-s so there is no dataloss? I am open to any suggestion about how to deal with the issue when your PersistentVolume is getting full!

Thank you for your answers, Bence Pjatacsuk

1 Answers1

0

Is there anyway I can increase the PV in size?

There is no official way to increase PV size in Kubernetes for now, actually I don't think this is Kubernetes' responsibility. Here's the related issue.

But you can increase it manually in two steps:

  1. Increase PV size in the backend storage, eg. resize GCE pd
  2. Change that PV size definition in Kubernetes cluster, eg. kubectl edit pv <pv_id>

As for data backup and restore, it depends on your backend storage. You can backup your PV (eg. create a snapshot) -> create a new one based on it -> and increase the size -> create a new pod with same definition but bind the larger size PV to it.

Crazykev
  • 392
  • 1
  • 9
  • Thanks, we are using NTFS for backend on baremetal. Unfortunatly the company can't use any cloud provider, so we have to do everything on baremetal. – Pjatacsuk Bence Apr 11 '17 at 10:33