Notice
Recent Posts
Recent Comments
Today
Total
04-29 02:04
Archives
관리 메뉴

Jeongchul Kim

[Google Cloud Platform] Filestore을 활용한 NFS 사용하기 본문

Google Cloud Platform

[Google Cloud Platform] Filestore을 활용한 NFS 사용하기

김 정출 2022. 7. 31. 20:20

[Google Cloud Platform] Filestore을 활용한 NFS 사용하기

 

 

Google Cloud Filestore는 고성능 완전 관리형 파일 스토리지입니다.

Filestore를 활용해 Google Kubenetes Engine(GKE)와 연결하여 Shared Volume을 구성하려고 합니다.

 

사이드 메뉴에서 Cloud FileStore를 클릭합니다. 사용 버튼을 클릭합니다.

 

인스턴스 만들기 버튼을 클릭합니다.

 

인스턴스 정보 입력를 입력합니다.

  • instance id: jckim-filestore
  • 서비스 등급: 기본
  • 스토리지 유형: HDD(연동 세팅으로 저렴한 옵션)
  • 리전: asia-northeast3
  • VPC: default
  • 파일 공유 이름: jckim_file

 

만들기 버튼을 클릭합니다.

 




생성이 시작됩니다.

수 분이 지나면 완료 됩니다. 해당 filestore를 클릭합니다.

 

해당 NFS 마운트 지점을 확인할 수 있습니다. 

10.0.225.2:/jckim_file

Kubernetes에서 Pod 생성 시에 해당 NFS로 마운트를 진행합니다.



Kubernetes의 Persistent Volume의 예시는 다음과 같습니다.

apiVersion: v1
kind: PersistentVolume
metadata:
  name: go-was-pv
  labels:
    app: go-was-app
spec:
  capacity:
     storage: 100Gi
  accessModes:
    - ReadWriteMany
  nfs:
    server: 10.0.225.2
    path: /jckim_file
  persistentVolumeReclaimPolicy: Retain

해당 내용은 GKE에서 확인해보겠습니다.

 

감사합니다.



Comments