Skip to main content

Persistent volume

Static provisioning#

  • ๊ด€๋ฆฌ์ž๊ฐ€ PV(PersistentVolume)๋ฅผ ์ƒ์„ฑ
  • PVC(PersistentVolumeClaim) ์ƒ์„ฑ, ๋ช…์‹œ๋œ ์š”๊ตฌ ์‚ฌํ•ญ์„ ์ถฉ์กฑ์‹œํ‚ฌ ์ˆ˜ ์žˆ๋Š” PV๊ฐ€ ์žˆ์œผ๋ฉด ๋ฐ”์ธ๋”ฉ

Dynamic provisioning#

  • StorageClass์— ํ”„๋กœ๋น„์ €๋‹์„ ์œ„ํ•œ ์†์„ฑ ์„ค์ •
  • StorageClass๋ฅผ ๋ช…์‹œํ•œ PVC ์ƒ์„ฑ
    • ๋ถ€ํ•ฉํ•˜๋Š” PV๊ฐ€ ์กด์žฌํ•˜๋ฉด ๋ฐ”์ธ๋”ฉ
    • ์—†์œผ๋ฉด StorageClass์˜ ์†์„ฑ์— ๋”ฐ๋ผ PV ์ƒ์„ฑ

StorageClass#

๊ธฐ๋ณธ StorageClass๋กœ ๋“ฑ๋กํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ์•„๋ž˜ ์„ค์ •์„ ์ถ”๊ฐ€ํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.

#...
metadata:
annotations:
storageclass.kubernetes.io/is-default-class: 'true'
#...

Local provisioner#

kustomize build "github.com/rancher/local-path-provisioner/deploy?ref=master" | kubectl apply -f -

PersistentVolume#

PersistentVolumeClaim#

Reference#

Last updated on