Difference between revisions of "Kind: PersistentVolume"

From wikieduonline
Jump to navigation Jump to search
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{lc}}
 
{{lc}}
 
* https://kubernetes.io/docs/concepts/storage/persistent-volumes/
 
* https://kubernetes.io/docs/concepts/storage/persistent-volumes/
 +
* https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#persistentvolume-v1-core
 +
* https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#persistentvolumespec-v1-core
  
 +
{{kind: PersitentVolume}}
  
apiVersion: v1
+
 
  kind: PersistentVolume
+
  {{kind: PersitentVolume with hostPath}}
metadata:
 
  name: pv0003
 
spec:
 
  capacity:
 
    storage: 5Gi
 
  volumeMode: Filesystem
 
  accessModes:
 
    - ReadWriteOnce
 
  persistentVolumeReclaimPolicy: Recycle
 
  storageClassName: slow
 
  mountOptions:
 
    - hard
 
    - nfsvers=4.1
 
  [[nfs:]]
 
    path: /tmp
 
    server: 172.17.0.2
 
  
 
== Related ==
 
== Related ==
 
* <code>[[kind: PersistentVolumeClaim]]</code>
 
* <code>[[kind: PersistentVolumeClaim]]</code>
* [[efs]]
+
* <code>[[efs]]</code>
 +
* <code>[[kubectl describe pv]]</code>
  
 
== See also ==
 
== See also ==

Latest revision as of 12:27, 8 February 2024

 apiVersion: v1
kind: PersistentVolume
metadata:
  name: pv0003
spec:
  capacity:
    storage: 5Gi
  volumeMode: Filesystem
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Recycle
  storageClassName: slow
  mountOptions:
    - hard
    - nfsvers=4.1
  nfs:
    path: /tmp
    server: 172.17.0.2


 apiVersion: v1
kind: PersistentVolume
metadata:
  name: task-pv-volume
  labels:
    type: local
spec:
  storageClassName: manual
  capacity:
    storage: 10Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/mnt/data"

Related[edit]

See also[edit]

Advertising: