Kubernetes Persistent Volume Manifest

From NovaOrdis Knowledge Base
Revision as of 18:05, 12 December 2019 by Ovidiu (talk | contribs)
Jump to navigation Jump to search

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

storageClassName

local

nodeAffinity