Minikube PV와 PVC의 accessModes 사용방법
2025. 1. 4. 14:49ㆍk8s
The accessModes field in PersistentVolume (PV) and PersistentVolumeClaim (PVC) specifies the types of access permissions available for the volume. It determines how the volume can be mounted by Pods.
Access Modes:
- ReadWriteOnce (RWO)
- Description: The volume can be mounted as read-write by a single node.
- Use Case: Suitable for scenarios where only one Pod requires write access at a time, such as block storage systems.
- Example Storage: AWS EBS, Azure Disk, GCE Persistent Disk.
- ReadOnlyMany (ROX)
- Description: The volume can be mounted as read-only by multiple nodes.
- Use Case: Ideal for shared data that doesn't require modifications, like configuration files or logs.
- Example Storage: NFS, Google Cloud Storage.
- ReadWriteMany (RWX)
- Description: The volume can be mounted as read-write by multiple nodes simultaneously.
- Use Case: Suitable for shared workloads where multiple Pods need simultaneous write access, such as shared logs or data processing.
- Example Storage: NFS, GlusterFS, CephFS.
- ReadWriteOncePod (RWOP) (Kubernetes 1.22+)
- Description: The volume can be mounted as read-write by only one Pod on a single node.
- Use Case: Useful for exclusive write access by a single Pod in StatefulSets.
- Example Storage: CSI drivers supporting this mode.
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: example-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
'k8s' 카테고리의 다른 글
Minikube volume 임시 제거 (0) | 2025.01.04 |
---|---|
Minikube deployment 실시간으로 변경하고 적용하기 (0) | 2025.01.04 |
Minikube 이미지가 이상하게 변경해도 바뀌지 않는 경우 (0) | 2025.01.04 |
Minikube 다운로드된 이미지 목록 확인 (1) | 2025.01.04 |
Minikube PV와 NFS 연결 (0) | 2025.01.03 |