"K8s PersistentVolume"의 두 판 사이의 차이

 
(같은 사용자의 중간 판 7개는 보이지 않습니다)
3번째 줄: 3번째 줄:
;쿠버네티스 영구볼륨
;쿠버네티스 영구볼륨
* 프로비저닝 방식 2가지: Static, [[k8s Dynamic Volume Provisioning|Dynamic]]
* 프로비저닝 방식 2가지: Static, [[k8s Dynamic Volume Provisioning|Dynamic]]
==hostPath==
{{참고|k8s hostPath PV}}
<syntaxhighlight lang='yaml'>
apiVersion: v1
kind: PersistentVolume
metadata:
  name: hostpath-pv
spec:
  capacity:
    storage: 1Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: /mnt/data
</syntaxhighlight>
==nfs==
{{참고|k8s NFS PV}}
<syntaxhighlight lang='yaml'>
apiVersion: v1
kind: PersistentVolume
metadata:
  name: mypv
spec:
  capacity:
    storage: 1Gi
  volumeMode: Filesystem
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Recycle
  storageClassName: slow
  mountOptions:
    - hard
    - nfsvers=4.1
  nfs:
    path: /tmp
    server: 172.17.0.2
</syntaxhighlight>


==같이 보기==
==같이 보기==
* [[kubectl get pv]]
* [[kubectl get pv]]
* [[쿠버네티스 PVC]]
* [[쿠버네티스 Volume]]
* [[쿠버네티스 Volume]]
* [[쿠버네티스 Storage Class]]
* [[쿠버네티스 Storage Class]]

2024년 6월 8일 (토) 22:59 기준 최신판

1 개요[ | ]

쿠버네티스 Persistent Volume (PV)
쿠버네티스 영구볼륨
  • 프로비저닝 방식 2가지: Static, Dynamic

2 hostPath[ | ]

apiVersion: v1
kind: PersistentVolume
metadata:
  name: hostpath-pv
spec:
  capacity:
    storage: 1Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: /mnt/data

3 nfs[ | ]

apiVersion: v1
kind: PersistentVolume
metadata:
  name: mypv
spec:
  capacity:
    storage: 1Gi
  volumeMode: Filesystem
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Recycle
  storageClassName: slow
  mountOptions:
    - hard
    - nfsvers=4.1
  nfs:
    path: /tmp
    server: 172.17.0.2

4 같이 보기[ | ]

5 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}