Difference between revisions of "Kubernetes Persistent Volumes (PV)"
Jump to navigation
Jump to search
↑ https://kubernetes.io/blog/2024/08/13/kubernetes-v1-31-release/#persistent-volume-last-phase-transition-time
(→News) |
|||
(18 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
+ | TOMERGE: [[Kubernetes Persistent volumes]] | ||
+ | |||
Kubernetes Persistent Volumes subsystem provides an API for users and administrators that abstracts details of how storage is provided from how it is consumed | Kubernetes Persistent Volumes subsystem provides an API for users and administrators that abstracts details of how storage is provided from how it is consumed | ||
+ | * https://kubernetes.io/docs/concepts/storage/persistent-volumes/ | ||
+ | * https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#persistentvolume-v1-core | ||
__NOTOC__ | __NOTOC__ | ||
* <code>[[kubectl get pvc]]</code> | * <code>[[kubectl get pvc]]</code> | ||
Line 9: | Line 13: | ||
== Examples == | == Examples == | ||
− | + | ||
− | + | {{k8s volumes examples}} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
* Claims: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#claims-as-volumes | * Claims: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#claims-as-volumes | ||
Line 56: | Line 47: | ||
== [[Kubernetes Persistent Volumes (PV) providers|Providers]] == | == [[Kubernetes Persistent Volumes (PV) providers|Providers]] == | ||
+ | |||
+ | == Error == | ||
+ | error: error validating "yourpv": error validating data: | ||
+ | ValidationError(PersistentVolume.spec.csi): missing required field "volumeHandle" in | ||
+ | io.k8s.api.core.v1.CSIPersistentVolumeSource; if you choose to ignore these errors, turn | ||
+ | validation off with --validate=false | ||
+ | |||
+ | == Metrics == | ||
+ | kubelet_volume_stats_available_bytes | ||
+ | kubelet_volume_stats_capacity_bytes | ||
+ | kubelet_volume_stats_inodes | ||
+ | kubelet_volume_stats_inodes_free | ||
+ | kubelet_volume_stats_inodes_used | ||
+ | kubelet_volume_stats_used_bytes | ||
+ | Ref: https://stackoverflow.com/questions/44718268/how-to-monitor-disk-usage-of-kubernetes-persistent-volumes | ||
== News == | == News == | ||
+ | * Aug 2024 Persistent Volume last phase transition time <ref>https://kubernetes.io/blog/2024/08/13/kubernetes-v1-31-release/#persistent-volume-last-phase-transition-time</ref> | ||
* Jun 2018 [[v1.11]] [[Resizing]] Persistent Volumes using Kubernetes in alpha | * Jun 2018 [[v1.11]] [[Resizing]] Persistent Volumes using Kubernetes in alpha | ||
+ | |||
+ | == CKA == | ||
+ | * [[CKA v1.23]]: [[Understand storage classes, persistent volumes]] | ||
+ | * [[CKA v1.18]]: Understand [[persistent volumes]] and know how to create them | ||
+ | * [[CKA v1.15]]: [[Understand PersistentVolumeClaims for storage]] | ||
+ | |||
+ | == Activities == | ||
+ | * [[Kubernetes: Rename PVs]] | ||
+ | * [[Access a volume with a temporary pod]] | ||
== Related terms == | == Related terms == | ||
Line 66: | Line 82: | ||
* [[Container Storage Interface (CSI)]] | * [[Container Storage Interface (CSI)]] | ||
* <code>[[defaultMode:]]</code> | * <code>[[defaultMode:]]</code> | ||
− | * [[values.yml]] | + | * <code>[[values.yml]]</code> |
+ | * <code>[[kubernetes_persistent_volume]]</code> | ||
+ | * <code>[[kind: ConfigMap]]</code> | ||
+ | * <code>[[kind: PersistentVolume]]</code> | ||
+ | * [[Terraform kubernetes resource: kubernetes persistent volume v1]] | ||
== See also == | == See also == | ||
+ | * {{K8s volumes}} | ||
* {{Kubernetes storage}} | * {{Kubernetes storage}} | ||
[[Category:K8s]] | [[Category:K8s]] |
Latest revision as of 14:47, 12 September 2024
TOMERGE: Kubernetes Persistent volumes
Kubernetes Persistent Volumes subsystem provides an API for users and administrators that abstracts details of how storage is provided from how it is consumed
- https://kubernetes.io/docs/concepts/storage/persistent-volumes/
- https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#persistentvolume-v1-core
Volumes: VolumeMounts: ExtraVolumes
Examples[edit]
volumes: your-vol-1: Type: ConfigMap (a volume populated by a ConfigMap) Name: prod-admin-config Optional: false
your-vol-2: Type: Secret (a volume populated by a Secret) SecretName: your-secret-name Optional: false
your-vol-3: Type: Projected (a volume that contains injected data from multiple sources) TokenExpirationSeconds: 3607 ConfigMapName: your-kube-root-ca.crt ConfigMapOptional: <nil> DownwardAPI: true
apiVersion: v1 kind: Pod metadata: name: mypod spec: containers: - name: myfrontend image: nginx volumeMounts: - mountPath: "/var/www/html" name: mypd volumes: - name: mypd persistentVolumeClaim: claimName: myclaim
spec: volumes: - name: elasticsearch-master persistentVolumeClaim: claimName: elasticsearch-master-elasticsearch-master-0 - name: mynewvolumen emptyDir: {}
Providers[edit]
Error[edit]
error: error validating "yourpv": error validating data: ValidationError(PersistentVolume.spec.csi): missing required field "volumeHandle" in io.k8s.api.core.v1.CSIPersistentVolumeSource; if you choose to ignore these errors, turn validation off with --validate=false
Metrics[edit]
kubelet_volume_stats_available_bytes kubelet_volume_stats_capacity_bytes kubelet_volume_stats_inodes kubelet_volume_stats_inodes_free kubelet_volume_stats_inodes_used kubelet_volume_stats_used_bytes
News[edit]
- Aug 2024 Persistent Volume last phase transition time [1]
- Jun 2018 v1.11 Resizing Persistent Volumes using Kubernetes in alpha
CKA[edit]
- CKA v1.23: Understand storage classes, persistent volumes
- CKA v1.18: Understand persistent volumes and know how to create them
- CKA v1.15: Understand PersistentVolumeClaims for storage
Activities[edit]
Related terms[edit]
- Persistent Volume Claim (PVC)
- Volumes (Kubernetes)
kubectl apply
- Container Storage Interface (CSI)
defaultMode:
values.yml
kubernetes_persistent_volume
kind: ConfigMap
kind: PersistentVolume
- Terraform kubernetes resource: kubernetes persistent volume v1
See also[edit]
- Kubernetes volumes:
volumeMounts:
,mountPath
, snapshots,spec.volumes
- 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
Advertising: