Kubernetes Persistent Volume Claim Manifest: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 26: Line 26:
{{External|https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1}}
{{External|https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1}}


Name of the [[Kubernetes_Storage_Concepts#Storage_Class_.28SC.29|StorageClass]] required by the claim. It is optional, if not present, it implies the default storage class.
Name of the [[Kubernetes_Storage_Concepts#Storage_Class_.28SC.29|StorageClass]] required by the claim. It is optional, if not present, it implies the [[Kubernetes_Storage_Concepts#Default_Storage_Class|default storage class]].


==volumeMode==
==volumeMode==

Revision as of 01:32, 12 December 2019

External

Internal

Example

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: pvc1
spec:
  accessModes:
  - RedWriteOnce
  storageClassName: test
  resources:
    requests:
      storage: 10 Gi
  ...

.spec Elements

The values in the .spec section must match with the persistent volume it intends to bind with. Persistent volume's access mode, storage class name and capacity must match.

accessModes

Access Mode

storageClassName

https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1

Name of the StorageClass required by the claim. It is optional, if not present, it implies the default storage class.

volumeMode

'volumeMode' defines what type of volume is required by the claim. Value of "Filesystem" is implied when not included in claim spec

resources

requests

storage