-
Notifications
You must be signed in to change notification settings - Fork 39.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support automatic resizing of volumes #35941
Comments
is there any plan to support this ? |
So if resize disk manually in compute console and then change PV definition? Will it take effect? |
yes, manually oc edit pv does work. but it is not automatic resizing. |
If you don't mind I'll ask about manual procedure of resizing. I have created 8GB PV in a cluster. What steps should be made to resize it to 10GB now?
What should be done to complete cluster PV resize procedure? I think recommended manual resize procedure should be documented somewhere. |
@whitecolor , I'm actually using openshift-origin, with the oc command line, I can manullay resize the PV by oc edit pv pv_id |
@saad-ali Are there any thoughts as to how this will interact with the PersistentVolumeController and PersistentVolumeClaims. In particular
|
Are you expecting Kubernetes to run the "resize2fs"? This would be nice - as this would not require to have privileged pods anymore to be able to run resize2fs, but I can also see how this could not be Kubernetes' responsibility. 1st you could support only increasing the disk space, shrinking is a whole different topic. |
Feature request is being tracked here: kubernetes/enhancements#284 |
Until this feature request is implemented, are there any recommended work-arounds to get resizing to work? After resizing the disk, do we need to log into each instance manually and run |
+1 on @speedplane 's question if anyone has experience doing it? |
This procedure is valid unless kubernetes introduces full support for resizing PVs. The feature is being tracked at kubernetes/enhancements#284Resize Kubernetes Persistent Volume using Amazon Elastic Block DeviceResize EBS with full OS on host (Centos/Debian/Ubuntu)WARNING Below instruction requires root access to host nodes with installed disk utilities (e2fsprogs/e2fsprogs-extra).
WARNING You will end with bigger Persistent Volume bounded to same, smaller Claim (see Appendixes) Generic procedure (not tested) - specifically when access to host OS is limited
WARNING You will end with bigger Persistent Volume bounded to same, smaller Claim (see appendixes). AppendixesClean status of Persistent Volume ClaimAs noted in procedure at the end of all steps you have remaining claim (request for storage) for smaller size, and a persistent volume (with bigger size) bounded to that claim. Everything is working fine unless persistent volume is bigger than the claim. To get proper claim size there are two options:
|
As the question above is if anyone is doing it or has experience with it, we have automated this in our postgresql operator (https://github.com/zalando-incubator/postgres-operator) and users are somewhat regularly triggering resizes via a user interface. As our pods/volumes are connected with stateful sets, we also delete those in the process and recreate to reflect the new size. The resize2fs we trigger from within the pods, which we run as privileged pods to allow it. |
^up: You could use init-container to limit privilege flag, but this would require pod restart |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or |
/remove-lifecycle stale |
There is support since 1.8 for some volume implementation: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claims So can this get closed? |
Actually.. I'm confused. Running 1.9.3 here and changing my EBS PV size doesn't do anything and according to https://kubernetes.io/docs/reference/feature-gates/, the feature gate ExpandPersistentVolumes doesn't exist in >1.8 anymore. |
Never mind, it also needs the admission plugin but then it should work (not tested). So probably still can be closed, right? |
@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 |
Ah, I see, the empathize is on automatic. This could be clarified in the issue description maybe. It sounds right now like it's not supported at all. |
We are on track for implementing online resizing in 1.11 - kubernetes/community#1535 . So you no longer have to re-start the pod to finish the resizing process, it will be "automatic" once you edit the pvc. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
This should be implemented and work out of box now. In any 1.15 cluster you can edit PVC (for volume types that support expansion) and have k8s take care of the rest. See - https://kubernetes.io/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claims /close |
@gnufied: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This is a feature request to support automatic resizing of volumes. For example, if a GCE PD is created as 50 GB, and then resized to 100 GB, the PV object should be able to updated by user to reflect the new size, and Kubernetes should automatically handle the resize, doing whatever is necessary to make the extra disk space available for use to pods. This is non-trivial since it requires repartitioning the disk (see https://cloud.google.com/compute/docs/disks/add-persistent-disk#resize_pd).
The text was updated successfully, but these errors were encountered: