Can a Persistent Volume be resized?

前端 未结 6 1750
悲哀的现实
悲哀的现实 2020-12-23 10:05

I\'m running a MySQL deployment on Kubernetes however seems like my allocated space was not enough, initially I added a persistent volume of 50GB and now I\'d l

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-23 10:45

    Yes, as of 1.11, persistent volumes can be resized on certain cloud providers. To increase volume size:

    1. Edit the PVC (kubectl edit pvc $your_pvc) to specify the new size. The key to edit is spec.resources.requests.storage:

    1. Terminate the pod using the volume.

    Once the pod using the volume is terminated, the filesystem is expanded and the size of the PV is increased. See the above link for details.

提交回复
热议问题