볼륨 풀을 만들거나 볼륨을 프로비저닝하기 전에 Google Kubernetes Engine(GKE)에 워크로드를 배포할지 또는 자체 조정 프레임워크를 사용할지 여부에 관계없이 일회성 프로젝트 설정을 완료하여 필요한 API를 사용 설정하고, IAM 역할을 부여하고, Filestore 서비스 에이전트를 초기화하고, Private Service Connect(PSC)를 사용하여 가상 프라이빗 클라우드(VPC) 네트워킹을 구성해야 합니다.
프로젝트 만들기 및 API 사용 설정
- Google Cloud 계정에 로그인합니다. Google Cloud를 처음 사용하는 경우 계정을 만들고 Google 제품의 실제 성능을 평가해 보세요. 신규 고객에게는 워크로드를 실행, 테스트, 배포하는 데 사용할 수 있는 $300의 무료 크레딧이 제공됩니다.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
If you're using an existing project for this guide, verify that you have the permissions required to complete this guide. If you created a new project, then you already have the required permissions.
-
Verify that billing is enabled for your Google Cloud project.
Enable the Filestore APIs, if any are not already enabled.
Roles required to enable APIs
To enable APIs, you need the
serviceusage.services.enablepermission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
If you're using an existing project for this guide, verify that you have the permissions required to complete this guide. If you created a new project, then you already have the required permissions.
-
Verify that billing is enabled for your Google Cloud project.
Enable the Filestore APIs, if any are not already enabled.
Roles required to enable APIs
To enable APIs, you need the
serviceusage.services.enablepermission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.
필요한 역할
Filestore 에이전트 볼륨을 설정하는 데 필요한 권한을 얻으려면 관리자에게 프로젝트에 대한 다음 IAM 역할을 부여해 달라고 요청하세요.
-
서비스 연결 정책 및 VPC 네트워킹 구성: Compute 네트워크 관리자(
roles/compute.networkAdmin) -
볼륨 풀 및 에이전트 볼륨을 포함한 Filestore 인스턴스 및 관련 리소스 보기 및 관리: Cloud Filestore 편집자(
roles/file.editor)
역할 부여에 대한 자세한 내용은 프로젝트, 폴더, 조직에 대한 액세스 관리를 참조하세요.
커스텀 역할이나 다른 사전 정의된 역할을 통해 필요한 권한을 얻을 수도 있습니다.
서비스 에이전트 초기화
프로젝트에 Filestore 인스턴스를 만들지 않은 경우 다음 명령어를 실행하여 Filestore 서비스 에이전트를 초기화합니다.
gcloud beta services identity create \
--service=file.googleapis.com \
--project=PROJECT_ID
PROJECT_ID를 Google Cloud프로젝트 ID로 바꿉니다.
서비스 에이전트에 권한 부여
Filestore 에이전트 볼륨을 설정하려면 Filestore 서비스 에이전트에 Cloud Filestore 편집자(roles/file.editor) 역할을 부여합니다.
gcloud projects add-iam-policy-binding PROJECT_ID \
--member="serviceAccount:service-PROJECT_NUMBER@cloud-filer.iam.gserviceaccount.com" \
--role="roles/file.editor"
다음을 바꿉니다.
PROJECT_ID: Google Cloud 프로젝트의 ID입니다.PROJECT_NUMBER:Google Cloud 프로젝트의 프로젝트 번호
Private Service Connect 네트워킹 구성
Filestore 에이전트 볼륨은 Private Service Connect를 사용하여 관리형 스토리지 인프라를 VPC 네트워크에 직접 연결합니다. Private Service Connect는 공개 IP 주소나 VPC 네트워크 피어링 구성 없이도 비공개, 고대역폭, 지연 시간이 짧은 통신을 보장합니다.
서비스 연결 정책을 만들려면 다음 명령어를 실행합니다.
gcloud network-connectivity service-connection-policies create POLICY_NAME \
--project=PROJECT_ID \
--region=REGION \
--network=projects/PROJECT_ID/global/networks/VPC_NETWORK \
--subnets=SUBNET_NAME \
--service-class=google-cloud-filestore
다음을 바꿉니다.
POLICY_NAME: 서비스 연결 정책의 이름입니다(예:filestore-agent-psc-policy).PROJECT_ID: Google Cloud 프로젝트의 ID입니다.REGION: 볼륨 풀과 워크로드가 상주할 리전입니다(예:us-central1).VPC_NETWORK: 기존 VPC 네트워크의 이름입니다.SUBNET_NAME: Private Service Connect 엔드포인트 IP 주소가 할당된 지정된 리전의 일반 VPC 서브넷 이름입니다. 예를 들어--purpose플래그가PRIVATE로 설정된 기본 서브넷을 사용할 수 있습니다.
볼륨 풀 만들기
볼륨 풀을 만들고 관리하여 공유 리전 용량과 IOPS를 예약합니다.
조정 경로 선택
- Filestore 에이전트 볼륨에 GKE 환경을 설정하여 Filestore CSI 드라이버를 사용해 볼륨을 자동으로 프로비저닝하고 마운트합니다.
- 오케스트레이션 프레임워크와 함께 Filestore 볼륨을 사용하여 개별 볼륨을 직접 프로비저닝, 클론, 계층화, 관리합니다.