Skip to content

Volume Object

syoung8002 edited this page Oct 20, 2020 · 3 revisions

Test Case #4. 상품 서비스에서는 상품 이미지를 저장하기 위해 파일 스토리지를 추가로 활용합니다.



4-1. PersistentVolumeClaim 설정

4-1-1. 오브젝트 팔레트에서 Persistence의 PersistentVolume, PersistentVolumeClaim 객체를 선택합니다.

4-1-2. 캔버스에 그려진 PV(PersistentVolume), PVC(PersistentVolumeClaim) 객체의 프로퍼티를 정의합니다.

  • PersistentVolume, PersistentVolumeClaim 객체를 더블클릭하여 프로퍼티 편집창을 호출합니다.
  • 각 프로퍼티 값은 다음과 같이 입력합니다.

Name: product-pv
AccessModes: ReadOnlyMany
Storage: 10Gi
ReclaimPolicy: Recycle
VolumeMode: Filesystem


Name: product-pvc
AccessModes: ReadOnlyMany
Storage: 10
VolumeMode: Filesystem

4-1-3. PV(PersistentVolume)와 PVC(PersistentVolumeClaim)을 연결합니다.

  • PVC(PersistentVolumeClaim) 객체를 클릭하여 ↗ 화살표 버튼을 클릭합니다.
  • 연결 점선이 나타나면 PV(PersistentVolume) 객체를 클릭합니다.
  • 연결선이 생기면 PVC 객체를 더블클릭하여 volumeName에 PV 객체의 Name이 있는지 확인합니다.

4-2. Deployment에 Volume 설정

4-2-1. Product Deployment 객체와 Product PVC 객체를 연결하여 Volume을 설정합니다.
  • product Deployment 객체를 클릭하여 ↗ 화살표 버튼을 클릭합니다.
  • 연결 점선이 나타나면 product-pvc 객체를 클릭합니다.
  • 연결선이 생기면 Deployment 객체를 더블클릭하여 spec.volumes에 PVC 객체가 있는지 확인합니다.

4-3. Yaml 확인 및 클라우드 배포

4-3-1. Code Preview에 들어가 객체의 Yaml을 확인합니다.

  • Yaml과 프로퍼티 편집창에서 설정한 값이 맞는지 확인합니다.

4-3-2. 메뉴 영역에서 Deploy 버튼을 클릭하여 객체를 배포합니다.

  • 배포 전 클러스터 정보를 확인합니다.

4-4. kubectl CLI

4-4-1. Shell 영역에서 kubectl get pv, kubectl get pvc 명령어로 배포를 확인합니다.

  • kubectl get pv 명령어 입력 후 PV 객체가 정상적으로 배포되었는지 확인합니다.
  • kubectl get pvc 명령어 입력 후 PVC 객체가 정상적으로 배포되었는지 확인합니다.



Clone this wiki locally