이 페이지에는 표준 VPC 네트워크에서 필수 구성요소를 설정하고, 인스턴스를 프로비저닝하고, 인스턴스를 설명하고, 인스턴스를 삭제하는 데 필요한 gcloud CLI 명령어가 나열되어 있습니다. 공유 VPC 네트워크에서 이러한 작업을 실행하는 방법에 대한 안내는 공유 VPC 네트워크의 인스턴스 프로비저닝을 참고하세요. 이러한 작업을 수행하려면 이 페이지의 각 섹션에 있는 안내를 따라야 합니다.
Redis용 Memorystore 클러스터 인스턴스를 프로비저닝할 프로젝트, 네트워크, 리전에 대한 서비스 연결 정책을 만들어야 합니다. 서비스 연결 정책을 사용하면 gcp-memorystore-redis 서비스 클래스가 정책이 정의된 리전과 정책에서 지정한 서브넷에서 프로듀서 및 소비자 VPC 네트워크 간에 Private Service Connect 연결을 만들도록 승인할 수 있습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[],[],null,["# Instance provisioning on a VPC network\n\nThis page lists the gcloud CLI commands needed to set up\nprerequisites, provision an instance, describe an instance, and delete an\ninstance on a standard VPC network. For instructions on performing these tasks\non a Shared VPC network, see [Instance provisioning on a Shared VPC network](/memorystore/docs/cluster/instance-provisioning-shared-vpc). In order to accomplish these\ntasks you should follow the instructions in each section of this page.\n\nFor more detailed guidance for these tasks, see the following pages:\n\n- [Networking](/memorystore/docs/cluster/networking)\n- [Create instances](/memorystore/docs/cluster/create-instances)\n- [List instances](/memorystore/docs/cluster/list-instances)\n- [Delete clusters](/memorystore/docs/cluster/delete-instances)\n\nEnable APIs\n-----------\n\nBegin by enabling the APIs in this section. These APIs are needed because\nMemorystore for Redis Cluster uses Private Service Connect service\nconnectivity automation to automate connectivity for instances. For more\ninformation, see [Networking](/memorystore/docs/cluster/networking).\n\nTo enable the APIs, run the following commands: \n\n### gcloud\n\n```\ngcloud services enable --project=PROJECT_ID networkconnectivity.googleapis.com\ngcloud services enable --project=PROJECT_ID compute.googleapis.com\ngcloud services enable --project=PROJECT_ID serviceconsumermanagement.googleapis.com\ngcloud services enable --project=PROJECT_ID redis.googleapis.com\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e is your project ID.\n\nCreate a service connection policy\n----------------------------------\n\nYou must create a [service connection policy](/vpc/docs/about-service-connection-policies)\nfor the project, network, and region where you want to provision the\nMemorystore for Redis Cluster instance. A service connection policy lets you authorize\nthe `gcp-memorystore-redis` service class to create a Private Service Connect\nconnection between producer and consumer VPC networks in the region where the\npolicy is defined, and in the subnets that the policy specifies.\n\nTo see the permission needed to create a service connection policy, see [required roles](/vpc/docs/configure-service-connection-policies#roles).\n\nThis walkthrough uses the `default` network and `default` subnet.\n\nTo create the service connection policy, run the following command: \n\n### gcloud\n\n```\ngcloud network-connectivity service-connection-policies create POLICY_NAME \\\n --network=default \\\n --project=PROJECT_ID \\\n --region=REGION \\\n --service-class=gcp-memorystore-redis \\\n --subnets=https://www.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/subnetworks/default\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePOLICY_NAME\u003c/var\u003e is your desired policy name.\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e is the project ID.\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e is the same region where you want to provision your Memorystore for Redis Cluster instance.\n\nValidate service connection policy creation\n-------------------------------------------\n\nValidate if the policy was created successfully by running the `list` command: \n\n### gcloud\n\n```\ngcloud network-connectivity service-connection-policies list --region=REGION --project=PROJECT_ID\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e is the project ID.\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e is the region where the service connection policy is defined.\n\nCreate an instance\n------------------\n\nTo create an instance, run the `create` command: \n\n### gcloud\n\n```\ngcloud redis clusters create INSTANCE_ID \\\n--project=PROJECT_ID \\\n--region=REGION \\\n--node-type=NODE_TYPE \\\n--shard-count=SHARD_COUNT \\\n--replica-count=REPLICA_COUNT \\\n--network=projects/PROJECT_ID/global/networks/default\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eINSTANCE_ID\u003c/var\u003e is the instance ID.\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e is the project ID.\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e is the region where you want to provision your instance.\n\n- \u003cvar translate=\"no\"\u003eNODE_TYPE\u003c/var\u003e is your chosen node type. Accepted values are:\n\n - `redis-shared-core-nano`\n - `redis-standard-small`\n - `redis-highmem-medium`\n - `redis-highmem-xlarge`\n\n | **Caution** : We recommend that you use the `redis-shared-core-nano` node type for development or testing purposes only. If you run Memorystore for Redis Cluster in a production environment, then we recommend using the `redis-standard-small`, `redis-highmem-medium`, or `redis-highmem-xlarge` node types. For more information about these node types, see [Choose a node type](/memorystore/docs/cluster/cluster-node-specification#choose_a_node_type).\n- \u003cvar translate=\"no\"\u003eSHARD_COUNT\u003c/var\u003e determines the number of shards in your\n instance. Shard count determines the total memory capacity for storing\n cluster data. To see more details about cluster specification, see [Cluster and node specification](/memorystore/docs/cluster/cluster-node-specification).\n\n- \u003cvar translate=\"no\"\u003eREPLICA_COUNT\u003c/var\u003e is your desired number of read replicas (per shard).\n Accepted values are `0`, `1`, and `2`.\n\n| **Note:** When running the `create` command you must use the same network and same region where the service connection policy is defined.\n\nDescribe the instance\n---------------------\n\nTo view instance details, run the `describe` command: \n\n### gcloud\n\n```\ngcloud redis clusters describe INSTANCE_ID \\\n--project=PROJECT_ID \\\n--region=REGION\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eINSTANCE_ID\u003c/var\u003e is the instance ID.\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e is the project ID.\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e is the region where your instance is located.\n\nDelete the instance\n-------------------\n\nTo delete an instance, run the `delete` command: \n\n### gcloud\n\n```\ngcloud redis clusters delete INSTANCE_ID \\\n--project=PROJECT_ID \\\n--region=REGION\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eINSTANCE_ID\u003c/var\u003e is the instance ID.\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e is the project ID.\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e is the region where your instance is located."]]