Does anyone have the link @Mohamed Ayman shared with this channel about using `p . . .

Joe:
Does anyone have the link @Mohamed Ayman shared with this channel about using patch to change the size of a persistent volume claim?
I cant seem to find it anywhere.

Fernando Jimenez:
I do not know the exact one you are referring to but you can do something like this:

kubectl patch my-pvc -p '{"spec":{"resources":{"requests":{"storage":"100Mi"}}}}}'

Fernando Jimenez:
That’s a very ugly thing to remember, if you ask me. That’s why I favor the kubectl edit or the kubectl get -o yaml > save.yaml and then kubectl apply -f save.yaml after amended.

Joe:
can you use kubectl edit AND increase pvc volume AND save the history?

Fernando Jimenez:
save the history?

Fernando Jimenez:
–record?

Joe:
do you mean something like kubectl edit <pvcname> --record ?

Fernando Jimenez:
Yes, I was thinking like: kubectl edit pvc pvc-claim --record
I do not know if that’s what you are looking for but in the help of it it shows as:

      --record=false: Record current kubectl command in the resource annotation. If set to false, do
not record the command. If set to true, record the command. If not set, default to updating the
existing annotation value only if one already exists.

unnivkn:
https://www.runlevl4.com/kubernetes/patching-kubernetes-resources#more-476

Rocky:
@Joe - <https://kubernetes.io/docs/tasks/administer-cluster/change-pv-reclaim-policy/|k8s doc> to patch pvc; we can refer to the yaml of the existing pvc for element to be patched.