Difference between revisions of "Kubernetes Persistent Volume Claim (PVC)"
Jump to navigation
Jump to search
(→Errors) |
|||
Line 53: | Line 53: | ||
* [[CKA v1.23]]: [[Understand persistent volume claims primitive]] | * [[CKA v1.23]]: [[Understand persistent volume claims primitive]] | ||
* [[Create a PersistentVolumeClaim]] | * [[Create a PersistentVolumeClaim]] | ||
+ | * [[Create a new volume using: kind: PersistentVolumeClaim]] | ||
+ | |||
* Read https://cloud.google.com/kubernetes-engine/docs/concepts/persistent-volumes | * Read https://cloud.google.com/kubernetes-engine/docs/concepts/persistent-volumes | ||
Revision as of 11:52, 2 February 2024
kubectl get pvc
kubectl get pvc -o yaml
kubectl describe pvc mysql-pv-claim
kubectl describe pvc grafana
kubectl patch pvc
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
gcePersistentDisk
- Cinder (OpenStack)
glusterfs
- rbd - Ceph RBD
- Azure File
- Azure Disk
- Portworx
- FlexVolumes
- Container Storage Interface (CSI)
Examples
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
FailedScheduling .../... Pod has unbound immediate PersistentVolumeClaims
- Warning ClaimLost persistentvolumeclaim/yourclaim Bound claim has lost reference to PersistentVolume. Data on the volume is lost! Cluster has no ready nodes.
0/7 nodes are available: 7 pod has unbound immediate PersistentVolumeClaims
Related terms
- Kubernetes Persistent Volumes (PV):
kind: PersistentVolume
kind: StorageClass
kubectl describe deployment | grep PersistentVolumeClaim
aws ec2 describe-volumes | grep -A1 Name
awsElasticBlockStore
kubectl get volumesnapshot
- K8up Kubernetes Backup Operator
kind: Provisioner
volumes:
- Kubernetes HostPath volume provider
- Data on Kubernetes Community (DoKC)
- DiskPressure
- persistentvolumeclaim "yourpvname" not found.
- Kubernetes Finalizers
Activities
- CKA v1.23: Understand persistent volume claims primitive
- Create a PersistentVolumeClaim
- Create a new volume using: kind: PersistentVolumeClaim
See also
- Kubernetes Persistent Volume Claim (PVC) (
kind: PersistentVolumeClaim
), Kubernetes Persistent volumes (PV)(kind: PersistentVolume)
,kubectl describe pvc, kubectl get pvc
, ClaimLost, ProvisioningSucceeded, PV access control - Kubernetes storage, storage classes, PersistentVolume (PV), PVC, CSI,
kind: StorageClass, kind: PersistentVolumeClaim, kind: PersistentVolume
,kubectl [ get | describe | edit ] pvc
,volumeClaimTemplates:
,kubectl patch pv
,FailedMount
, Volume Expansion, Volume Cloning, snapshots, ExtraVolumes, NotTriggerScaleUp,volumePVCDataSource, AllowVolumeExpansion
, EKS storage, provisioner, Storage Capacity Tracking,VolumeBinding, VolumeClaimTemplate, storage.k8s.io
, CKA Storage, DoKC, EmptyDir, Volume populators,storageclass.kubernetes.io
- DoKC, Kubernetes storage, PVC
Advertising: