Thanh Q Nguyen:
Hi,
i am preparing for the CKA and i have some questions:
- For resizing PVC: if there are a PV and a matching PVC of 10Mi, how i can resize PVC to 70Mi ?
- which command i can make a node unavailable and reschedule all running pods in that node?
Mariusz Gomse:
Hi, I’m quite newbie to k8s, but let me try to help:
Ad 1) According <https://kubernetes.io/blog/2018/07/12/resizing-persistent-volumes-using-kubernetes/|to this article> you just need to edit pvc and change stogage
property to 70Mi
Ad 2) I’m quite sure that drain
is your command (see more https://kubernetes.io/blog/2018/07/12/resizing-persistent-volumes-using-kubernetes/|here)
Thanh Q Nguyen:
Thank you very much - so for the PVC i also need to change PV size first before change the PVC, right ?
Mariusz Gomse:
it depends - as written in the article if you have set allowVolumeExpansion
to true
(and you have supported PV) then everything should be done automatically
I never tried it - I’m writing according to articles
more about this feature https://kubernetes.io/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claims|here
unfortunately I don’t have experience with resizing PV so I’m not sure what in case when allowVolumeExpansion
won’t be possible - maybe anybody else can help here?