Editing Kubernetes Persistent Volumes (PV)

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
TOMERGE: [[Kubernetes Persistent volumes]]
+
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__
 
 
* <code>[[kubectl get pvc]]</code>
 
* <code>[[kubectl get pvc]]</code>
 
* <code>[[kubectl describe pvc mysql-pv-claim]]</code>
 
* <code>[[kubectl describe pvc mysql-pv-claim]]</code>
  
  Volumes:
+
  GCEPersistentDisk
  [[VolumeMounts:]]
+
AWSElasticBlockStore
  [[ExtraVolumes]]
+
AzureFile
 +
AzureDisk
 +
[[CSI]] ([[Container Storage Interface]])
 +
FC (Fibre Channel)
 +
  [[FlexVolume]] (deprecated)
 +
Flocker
 +
NFS
 +
iSCSI
 +
RBD (Ceph Block Device)
 +
CephFS
 +
Cinder (OpenStack block storage)
 +
Glusterfs
 +
VsphereVolume
 +
Quobyte Volumes
 +
  [[HostPath]] (Single node testing only -- local storage is not supported in any way and WILL NOT WORK in a multi-node cluster)
 +
Portworx Volumes
 +
ScaleIO Volumes
 +
StorageOS
 +
Persisten
  
== Examples ==
 
 
{{k8s volumes examples}}
 
 
* Claims: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#claims-as-volumes
 
<pre>
 
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
 
</pre>
 
  
 +
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
  
 
 
spec:
 
  volumes:
 
    - name: elasticsearch-master
 
      [[persistentVolumeClaim:]]
 
        [[claimName:]] elasticsearch-master-elasticsearch-master-0
 
    - name: mynewvolumen
 
      emptyDir: {}
 
 
== [[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 ==
* Jun 2018 [[v1.11]] [[Resizing]] Persistent Volumes using Kubernetes in alpha
+
* [[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 79: Line 52:
 
* [[Volumes (Kubernetes)]]
 
* [[Volumes (Kubernetes)]]
 
* <code>[[kubectl apply]]</code>
 
* <code>[[kubectl apply]]</code>
* [[Container Storage Interface (CSI)]]
 
* <code>[[defaultMode:]]</code>
 
* <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}}
+
* {{K8s}}
* {{Kubernetes storage}}
+
 
  
 
[[Category:K8s]]
 
[[Category:K8s]]

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Advertising: