Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resize a gkePersistentDisk pod volume after gcloud compute disks resize

Volumes created through GKE can easily be resized using gcloud compute disks resize [volume name from kubectl get pv]. The pod will keep running.

However a df in the pod will still report the same size. More importantly kubectl describe pv will still report the original "capacity". Is there a way to grow the pod's actual storage space on the volume?

Official support may be in the roadmap, according to https://github.com/kubernetes/kubernetes/issues/24255#issuecomment-210227126, but where is that discussion taking place?

like image 711
solsson Avatar asked Nov 09 '22 08:11

solsson


1 Answers

Usually containers in pods are designed to be ephemeral. If this is the design of your deployment then kill the pod and once the pod restarts it should reattach to the gcePersistentDisk with the correct size.

like image 137
Alex Luis Arias Avatar answered Nov 15 '22 08:11

Alex Luis Arias