GKE PVC Resize
TL; DR: No impact when PVC re-claim
1.Deploy pvc to standard class
$ k get pv,pvc
No resources found2.Check storageclass (which is predefined)
k get storageclasses.storage.k8s.io
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
premium-rwo pd.csi.storage.gke.io Delete WaitForFirstConsumer true 13d
standard (default) kubernetes.io/gce-pd Delete Immediate true 13d
standard-rwo pd.csi.storage.gke.io Delete WaitForFirstConsumer true 13d
3.Check dynamic-provisioner to storageclass
$ cat pvc-dynamic.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-dynamic
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
storageClassName: standard4. apply it!!!
5. Check pv,pvc
6.Check deployment to use this pvc
7. Create bundle data in the deployment(pod)
8.Check bundle data in the container
9. Change storage capacity from 20Gi to 30Gi and apply it
10. Check again pv,pvc
11. re-deploy deployment by delete
12. Check data is sustained
DONE!!!! Successfully
Reference:
Last updated
Was this helpful?