Kubernetes Persistent Volumes (PV)

From wikieduonline
Revision as of 14:47, 12 September 2024 by Welcome (talk | contribs) (→‎News)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

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

Ref: https://stackoverflow.com/questions/44718268/how-to-monitor-disk-usage-of-kubernetes-persistent-volumes

News[edit]

  • Aug 2024 Persistent Volume last phase transition time [1]
  • Jun 2018 v1.11 Resizing Persistent Volumes using Kubernetes in alpha

CKA[edit]

Activities[edit]

Related terms[edit]

See also[edit]

  • https://kubernetes.io/blog/2024/08/13/kubernetes-v1-31-release/#persistent-volume-last-phase-transition-time
  • Advertising: