I am using multiple apps on kubernetes and all are configured with pd-ssd
volume. Some deployments are running on big volume with less data. So i wanted to reduce that volume of the pods. I have worked with increase volumen and it was worked. But i can't reduce the space of the volume.
Steps i did. Current size is 100Gi, I want to resize it to 30Gi.
k edit pvc my-pvc
I got the following error when I save the changes.
error: persistentvolumeclaims "my-pvc" is invalid A copy of your changes has been stored to "/tmp/kubectl-edit-4ivk1.yaml" error: Edit cancelled, no valid changes were saved.
But i can not able to save the changes for reduce volume size.
Shrinking persistent volumes is not supported in kubernetes, you can only increase it. resizing-persistent-volumes-using-kubernetes