Kubernetes Persistent Volume Manifest: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 17: Line 17:
   storageClassName: local-storage
   storageClassName: local-storage
   local:
   local:
      path: /mnt/disks/vol1
    path: /mnt/disks/vol1
    nodeAffinity:
  nodeAffinity:
      required:
    required:
        nodeSelectorTerms:
      nodeSelectorTerms:
         - matchExpressions:
         - matchExpressions:
          - key: kubernetes.io/hostname
            - key: kubernetes.io/hostname
            operator: In
                operator: In
            values:
                values:
            - my-node
                - my-node
  ...


=.spec Elements=
=.spec Elements=

Revision as of 18:02, 12 December 2019

Internal

Example

apiVersion: v1
kind: PersistentVolume
metadata:
  name: blue
spec:
  accessModes:
  - RedWriteOnce
  storageClassName: test
  capacity:
    storage: 10Gi
  persistentVolumeReclaimPolicy: Retain
  storageClassName: local-storage
  local:
    path: /mnt/disks/vol1
  nodeAffinity:
    required:
      nodeSelectorTerms:
        - matchExpressions:
            - key: kubernetes.io/hostname
               operator: In
               values:
               - my-node

.spec Elements

accessModes

Access Mode

storageClassName

persistentVolumeReclaimPolicy

Reclaim Policy

capacity

Capacity