Kubernetes Persistent Volume Claim (PVC)

From wikieduonline
Revision as of 11:19, 2 February 2024 by Welcome (talk | contribs) (→‎Errors)
Jump to navigation Jump to search
kind: PersistentVolumeClaim
kind: PersistentVolume
kind: StorageClass
error: persistentvolumeclaims "your-elasticsearch-master-0" could not be patched: persistentvolumeclaims "your-elasticsearch-master-0" is forbidden: only dynamically provisioned pvc can be resized and the storageclass that provisions the pvc must support resize.
ProvisioningFailed

PVC types

Examples

Volume expansion

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: myclaim
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi # specify new size here
kubectl apply -f your_new_pvc.yml
persistentvolumeclaim/myclaim created


kubectl describe pvc yourpv
 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: example.com/aws-efs
 creationTimestamp: "2022-10-27T15:10:12Z"
 finalizers:
 - kubernetes.io/pvc-protection
 managedFields:
 ...
   manager: kube-controller-manager
   operation: Update
   time: "2022-10-27T15:10:13Z"
 name: yourpv
 namespace: mynamespace
 resourceVersion: "719208361"
 [[selfLink: /api/v1/namespaces/mynamespace/persistentvolumeclaims/myvoy
 uid: b3295ba0-0000-123-123-1234567
spec:
 accessModes:
 - ReadWriteOnce
 resources:
   requests:
     storage: 5Gi
 storageClassName: efs
 volumeMode: Filesystem
 volumeName: pvc-1234-1234-1234-1234-123456789
status:
 accessModes:
 - ReadWriteOnce
 capacity:
   storage: 5Gi
 phase: Bound

Errors

Related terms

Activities

See also

Advertising: