I do not know if this is specific to GKE or k8s storage in general. I assume it’s user error.
I’m creating PVCs in GKE with both requests
and limits
set (to the same thing) but the resulting PV capacity is much higher, as well as the capacity shown in PVC status. For example, a request for 1Gi
resulting in 2.5Ti
. I don’t know where the 2560Gi
is coming from after searching around the GKE console:
Original request for a 1G PVC:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: my-pvc0
spec:
accessModes:
- ReadWriteMany
resources:
limits:
storage: 1Gi
requests:
storage: 1Gi
storageClassName: my-storage-class0
Resultant PVC:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations:
pv.kubernetes.io/bind-completed: "yes"
pv.kubernetes.io/bound-by-controller: "yes"
volume.beta.kubernetes.io/storage-provisioner: filestore.csi.storage.gke.io
volume.kubernetes.io/storage-provisioner: filestore.csi.storage.gke.io
finalizers:
- kubernetes.io/pvc-protection
name: my-pvc0
spec:
accessModes:
- ReadWriteMany
resources:
limits:
storage: 1Gi
requests:
storage: 1Gi
storageClassName: my-storage-class0
volumeMode: Filesystem
volumeName: pvc-XXXXXXXXXXXXXXXXXXXX
status:
accessModes:
- ReadWriteMany
capacity:
storage: 2560Gi
phase: Bound
Resultant PV:
apiVersion: v1
kind: PersistentVolume
metadata:
annotations:
pv.kubernetes.io/provisioned-by: filestore.csi.storage.gke.io
volume.kubernetes.io/provisioner-deletion-secret-name: ""
volume.kubernetes.io/provisioner-deletion-secret-namespace: ""
finalizers:
- kubernetes.io/pv-protection
name: pvc-XXXXXXXXXXXXXXXXXXXX
spec:
accessModes:
- ReadWriteMany
capacity:
storage: 2560Gi
claimRef:
apiVersion: v1
kind: PersistentVolumeClaim
name: my-pvc0
csi:
driver: filestore.csi.storage.gke.io
volumeAttributes:
ip: 10.###.###.###
storage.kubernetes.io/csiProvisionerIdentity: #####-filestore.csi.storage.gke.io
volume: vol1
persistentVolumeReclaimPolicy: Delete
storageClassName: my-storage-class0
volumeMode: Filesystem
status:
phase: Bound
Also, the StorageClass:
allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
annotations:
components.gke.io/component-name: filestorecsi
components.gke.io/component-version: 0.10.18
components.gke.io/layer: addon
labels:
addonmanager.kubernetes.io/mode: EnsureExists
k8s-app: gcp-filestore-csi-driver
name: my-store-class0
parameters:
tier: premium
provisioner: filestore.csi.storage.gke.io
reclaimPolicy: Delete
volumeBindingMode: Immediate
I tried the above, and expected the PV and PVC.status capacity to match the original 1Gi
requested.
Matthew Monaco is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.