K8S Storage - Levels of volume abstractions

86 阅读1分钟
  1. k8s storage access abstraction
  • Pod requests the volume through the PV clain
  • The Claim tries to find a volume in cluster
  • Volume has the actual storage backend
  1. The Claims must be in the same namespace as the pod using the claim

Configuration in pod level sample:

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: pvc-name