2
votes

I have a statefulset of kafka. I need to expand the disk size, i try wihout succes to use the automatic resize feature of k8s 1.9

Here : https://kubernetes.io/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claims

I did activate feature gates and admission pluging, i think it's work beacause i can succefully change the size of the pvc after the modification.

But nothing happend i have modified the size of the PVC from 50Gi to 250Gi.

The capacity did change everywhere in the pvc, but not on AWS the EBS volume is still 50gb and a df -h in the pod still show 50gb

Did i miss something ? Do i have to manually resize on aws ?

thank you

2

2 Answers

1
votes

That is an alpha feature which has some problems and limitations.

Try to find some information on the Issues on Github which is related to your problem:

Also, check that comment, it can be useful:

@discordianfish please try EBS PVC resize with 1.10. Currently the user experience of resizing volumes with file systems is not ideal. You will have to edit the pvc and then wait for FileSystemResizePending condition to appear on PVC and then delete and recreate the pod that was using the PVC. If there was no pod using the PVC, then once condition FileSystemResizePending appears on PVC then you will have to start a pod using it for file system resize to finish.

1
votes

I made the feature work, but in a very very dirty way.

  1. Modify the size of the PVC
  2. Modify the size of the EBS manually
  3. Force unmount the volume on AWS
  4. The pod crash and is rescheduled by the statefullset, when the pod is up again the volume and partition have the correct size